<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: yui   loader.js  (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
	<link rel="stylesheet" type="text/css" href="assets/api.css" />

    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
        <h3>yui&nbsp; <span class="subtitle">3.0.0b1</span></h3>
        <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> 
            &gt; <a href="./module_yui.html" title="yui">yui</a>
                
                 &gt; loader.js (source view) 
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <div id="srcout">
                        <style>
                            #doc3 .classopts { display:none; }
                        </style>
<div class="highlight" ><pre><span class="o">(</span><span class="k">function</span><span class="o">()</span> <span class="o">{</span>
<span class="c">/**</span>
<span class="c"> * Loader dynamically loads script and css files.  It includes the dependency</span>
<span class="c"> * info for the version of the library in use, and will automatically pull in</span>
<span class="c"> * dependencies for the modules requested.  It supports rollup files and will</span>
<span class="c"> * automatically use these when appropriate in order to minimize the number of</span>
<span class="c"> * http connections required to load all of the dependencies.  It can load the</span>
<span class="c"> * files from the Yahoo! CDN, and it can utilize the combo service provided on</span>
<span class="c"> * this network to reduce the number of http connections required to download </span>
<span class="c"> * YUI files.</span>
<span class="c"> *</span>
<span class="c"> * @module yui</span>
<span class="c"> * @submodule loader</span>
<span class="c"> */</span>

<span class="c">/**</span>
<span class="c"> * Loader dynamically loads script and css files.  It includes the dependency</span>
<span class="c"> * info for the version of the library in use, and will automatically pull in</span>
<span class="c"> * dependencies for the modules requested.  It supports rollup files and will</span>
<span class="c"> * automatically use these when appropriate in order to minimize the number of</span>
<span class="c"> * http connections required to load all of the dependencies.  It can load the</span>
<span class="c"> * files from the Yahoo! CDN, and it can utilize the combo service provided on</span>
<span class="c"> * this network to reduce the number of http connections required to download </span>
<span class="c"> * YUI files.</span>
<span class="c"> * @class Loader</span>
<span class="c"> * @constructor</span>
<span class="c"> * @param o an optional set of configuration options.  Valid options:</span>
<span class="c"> * &lt;ul&gt;</span>
<span class="c"> *  &lt;li&gt;base:</span>
<span class="c"> *  The base dir&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;secureBase:</span>
<span class="c"> *  The secure base dir (not implemented)&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;comboBase:</span>
<span class="c"> *  The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;root:</span>
<span class="c"> *  The root path to prepend to module names for the combo service. Ex: 2.5.2/build/&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;filter:</span>
<span class="c"> *  </span>
<span class="c"> * A filter to apply to result urls.  This filter will modify the default</span>
<span class="c"> * path for all modules.  The default path for the YUI library is the</span>
<span class="c"> * minified version of the files (e.g., event-min.js).  The filter property</span>
<span class="c"> * can be a predefined filter or a custom filter.  The valid predefined </span>
<span class="c"> * filters are:</span>
<span class="c"> * &lt;dl&gt;</span>
<span class="c"> *  &lt;dt&gt;DEBUG&lt;/dt&gt;</span>
<span class="c"> *  &lt;dd&gt;Selects the debug versions of the library (e.g., event-debug.js).</span>
<span class="c"> *      This option will automatically include the Logger widget&lt;/dd&gt;</span>
<span class="c"> *  &lt;dt&gt;RAW&lt;/dt&gt;</span>
<span class="c"> *  &lt;dd&gt;Selects the non-minified version of the library (e.g., event.js).&lt;/dd&gt;</span>
<span class="c"> * &lt;/dl&gt;</span>
<span class="c"> * You can also define a custom filter, which must be an object literal </span>
<span class="c"> * containing a search expression and a replace string:</span>
<span class="c"> * &lt;pre&gt;</span>
<span class="c"> *  myFilter: &amp;#123; </span>
<span class="c"> *      &#39;searchExp&#39;: &quot;-min\\.js&quot;, </span>
<span class="c"> *      &#39;replaceStr&#39;: &quot;-debug.js&quot;</span>
<span class="c"> *  &amp;#125;</span>
<span class="c"> * &lt;/pre&gt;</span>
<span class="c"> *</span>
<span class="c"> *  &lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;filters: per-component filter specification.  If specified for a given component, this overrides the filter config&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;combine:</span>
<span class="c"> *  Use the YUI combo service to reduce the number of http connections required to load your dependencies&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;ignore:</span>
<span class="c"> *  A list of modules that should never be dynamically loaded&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;force:</span>
<span class="c"> *  A list of modules that should always be loaded when required, even if already present on the page&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;insertBefore:</span>
<span class="c"> *  Node or id for a node that should be used as the insertion point for new nodes&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;charset:</span>
<span class="c"> *  charset for dynamic nodes (deprecated, use jsAttributes or cssAttributes)&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;jsAttributes: object literal containing attributes to add to script nodes&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;cssAttributes: object literal containing attributes to add to link nodes&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;timeout:</span>
<span class="c"> *  number of milliseconds before a timeout occurs when dynamically loading nodes.  in not set, there is no timeout&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;context:</span>
<span class="c"> *  execution context for all callbacks&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;onSuccess:</span>
<span class="c"> *  callback for the &#39;success&#39; event&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;onFailure: callback for the &#39;failure&#39; event&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;onCSS: callback for the &#39;CSSComplete&#39; event.  When loading YUI components with CSS</span>
<span class="c"> *  the CSS is loaded first, then the script.  This provides a moment you can tie into to improve</span>
<span class="c"> *  the presentation of the page while the script is loading.&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;onTimeout:</span>
<span class="c"> *  callback for the &#39;timeout&#39; event&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;onProgress:</span>
<span class="c"> *  callback executed each time a script or css file is loaded&lt;/li&gt;</span>
<span class="c"> *  &lt;li&gt;modules:</span>
<span class="c"> *  A list of module definitions.  See Loader.addModule for the supported module metadata&lt;/li&gt;</span>
<span class="c"> * &lt;/ul&gt;</span>
<span class="c"> */</span>

<span class="c">// @TODO backed out the custom event changes so that the event system</span>
<span class="c">// isn&#39;t required in the seed build.  If needed, we may want to </span>
<span class="c">// add them back if the event system is detected.</span>
<span class="c"></span>

<span class="c">/*</span>
<span class="c"> * Global loader queue</span>
<span class="c"> * @property _loaderQueue</span>
<span class="c"> * @type Queue</span>
<span class="c"> * @private</span>
<span class="c"> */</span>
<span class="nx">YUI</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">_loaderQueue</span> <span class="o">=</span> <span class="nx">YUI</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">_loaderQueue</span> <span class="o">||</span> <span class="k">new</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Queue</span><span class="o">();</span>

<span class="k">var</span> <span class="nx">GLOBAL_ENV</span> <span class="o">=</span> <span class="nx">YUI</span><span class="o">.</span><span class="nx">Env</span><span class="o">,</span>
    <span class="nx">GLOBAL_LOADED</span><span class="o">,</span>
    <span class="nx">BASE</span> <span class="o">=</span> <span class="s1">&#39;base&#39;</span><span class="o">,</span> 
    <span class="nx">CSS</span> <span class="o">=</span> <span class="s1">&#39;css&#39;</span><span class="o">,</span>
    <span class="nx">JS</span> <span class="o">=</span> <span class="s1">&#39;js&#39;</span><span class="o">,</span>
    <span class="nx">CSSRESET</span> <span class="o">=</span> <span class="s1">&#39;cssreset&#39;</span><span class="o">,</span>
    <span class="nx">CSSFONTS</span> <span class="o">=</span> <span class="s1">&#39;cssfonts&#39;</span><span class="o">,</span>
    <span class="nx">CSSGRIDS</span> <span class="o">=</span> <span class="s1">&#39;cssgrids&#39;</span><span class="o">,</span>
    <span class="nx">CSSBASE</span>  <span class="o">=</span> <span class="s1">&#39;cssbase&#39;</span><span class="o">,</span>
    <span class="nx">CSS_AFTER</span> <span class="o">=</span> <span class="o">[</span><span class="nx">CSSRESET</span><span class="o">,</span> <span class="nx">CSSFONTS</span><span class="o">,</span> <span class="nx">CSSGRIDS</span><span class="o">,</span> 
                 <span class="s1">&#39;cssreset-context&#39;</span><span class="o">,</span> <span class="s1">&#39;cssfonts-context&#39;</span><span class="o">,</span> <span class="s1">&#39;cssgrids-context&#39;</span><span class="o">],</span>
    <span class="nx">YUI_CSS</span> <span class="o">=</span> <span class="o">[</span><span class="s1">&#39;reset&#39;</span><span class="o">,</span> <span class="s1">&#39;fonts&#39;</span><span class="o">,</span> <span class="s1">&#39;grids&#39;</span><span class="o">,</span> <span class="nx">BASE</span><span class="o">],</span>
    <span class="nx">VERSION</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">version</span><span class="o">,</span>
    <span class="nx">ROOT</span> <span class="o">=</span> <span class="nx">VERSION</span> <span class="o">+</span> <span class="s1">&#39;/build/&#39;</span><span class="o">,</span>
    <span class="nx">CONTEXT</span> <span class="o">=</span> <span class="s1">&#39;-context&#39;</span><span class="o">,</span>


    <span class="nx">ANIMBASE</span> <span class="o">=</span> <span class="s1">&#39;anim-base&#39;</span><span class="o">,</span>
    <span class="nx">DDDRAG</span> <span class="o">=</span> <span class="s1">&#39;dd-drag&#39;</span><span class="o">,</span>
    <span class="nx">DOM</span> <span class="o">=</span> <span class="s1">&#39;dom&#39;</span><span class="o">,</span>
    <span class="nx">DATASCHEMABASE</span> <span class="o">=</span> <span class="s1">&#39;dataschema-base&#39;</span><span class="o">,</span>
    <span class="nx">DATASOURCELOCAL</span> <span class="o">=</span> <span class="s1">&#39;datasource-local&#39;</span><span class="o">,</span>
    <span class="nx">DOMBASE</span> <span class="o">=</span> <span class="s1">&#39;dom-base&#39;</span><span class="o">,</span>
    <span class="nx">DOMSTYLE</span> <span class="o">=</span> <span class="s1">&#39;dom-style&#39;</span><span class="o">,</span>
    <span class="nx">DUMP</span> <span class="o">=</span> <span class="s1">&#39;dump&#39;</span><span class="o">,</span>
    <span class="nx">GET</span> <span class="o">=</span> <span class="s1">&#39;get&#39;</span><span class="o">,</span>
    <span class="nx">EVENT</span> <span class="o">=</span> <span class="s1">&#39;event&#39;</span><span class="o">,</span>
    <span class="nx">EVENTCUSTOM</span> <span class="o">=</span> <span class="s1">&#39;event-custom&#39;</span><span class="o">,</span>
    <span class="nx">IOBASE</span> <span class="o">=</span> <span class="s1">&#39;io-base&#39;</span><span class="o">,</span>
    <span class="nx">NODE</span> <span class="o">=</span> <span class="s1">&#39;node&#39;</span><span class="o">,</span>
    <span class="nx">NODEBASE</span> <span class="o">=</span> <span class="s1">&#39;node-base&#39;</span><span class="o">,</span>
    <span class="nx">OOP</span> <span class="o">=</span> <span class="s1">&#39;oop&#39;</span><span class="o">,</span>
    <span class="nx">SELECTORCSS2</span> <span class="o">=</span> <span class="s1">&#39;selector-css2&#39;</span><span class="o">,</span>
    <span class="nx">SUBSTITUTE</span> <span class="o">=</span> <span class="s1">&#39;substitute&#39;</span><span class="o">,</span>
    <span class="nx">WIDGET</span> <span class="o">=</span> <span class="s1">&#39;widget&#39;</span><span class="o">,</span>
    <span class="nx">WIDGETPOSITION</span> <span class="o">=</span> <span class="s1">&#39;widget-position&#39;</span><span class="o">,</span>
    <span class="nx">YUIBASE</span> <span class="o">=</span> <span class="s1">&#39;yui-base&#39;</span><span class="o">,</span>

	<span class="nx">PLUGIN</span> <span class="o">=</span> <span class="s1">&#39;plugin&#39;</span><span class="o">,</span>

    <span class="nx">META</span> <span class="o">=</span> <span class="o">{</span>

    <span class="nx">version</span><span class="o">:</span> <span class="nx">VERSION</span><span class="o">,</span>

    <span class="nx">root</span><span class="o">:</span> <span class="nx">ROOT</span><span class="o">,</span>

    <span class="nx">base</span><span class="o">:</span> <span class="s1">&#39;http://yui.yahooapis.com/&#39;</span> <span class="o">+</span> <span class="nx">ROOT</span><span class="o">,</span>

    <span class="nx">comboBase</span><span class="o">:</span> <span class="s1">&#39;http://yui.yahooapis.com/combo?&#39;</span><span class="o">,</span>

    <span class="nx">skin</span><span class="o">:</span> <span class="o">{</span>
        <span class="nx">defaultSkin</span><span class="o">:</span> <span class="s1">&#39;sam&#39;</span><span class="o">,</span>
        <span class="nx">base</span><span class="o">:</span> <span class="s1">&#39;assets/skins/&#39;</span><span class="o">,</span>
        <span class="nx">path</span><span class="o">:</span> <span class="s1">&#39;skin.css&#39;</span><span class="o">,</span>
        <span class="nx">after</span><span class="o">:</span> <span class="nx">CSS_AFTER</span>
        <span class="c">//rollup: 3</span>
<span class="c"></span>    <span class="o">},</span>

    <span class="nx">modules</span><span class="o">:</span> <span class="o">{</span>

       <span class="nx">dom</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">OOP</span><span class="o">],</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>

                <span class="s1">&#39;dom-base&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">OOP</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;dom-style&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DOMBASE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;dom-screen&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DOMBASE</span><span class="o">,</span> <span class="nx">DOMSTYLE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;selector-native&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DOMBASE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;selector-css2&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;selector-native&#39;</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;selector&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DOMBASE</span><span class="o">]</span>
                <span class="o">}</span>

            <span class="o">},</span>

            <span class="nx">plugins</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;selector-css3&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">SELECTORCSS2</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">node</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DOM</span><span class="o">,</span> <span class="nx">BASE</span><span class="o">],</span>
            <span class="nx">expound</span><span class="o">:</span> <span class="nx">EVENT</span><span class="o">,</span>

            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;node-base&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DOMBASE</span><span class="o">,</span> <span class="nx">BASE</span><span class="o">,</span> <span class="nx">SELECTORCSS2</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;node-style&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DOMSTYLE</span><span class="o">,</span> <span class="nx">NODEBASE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;node-screen&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;dom-screen&#39;</span><span class="o">,</span> <span class="nx">NODEBASE</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">},</span>

            <span class="nx">plugins</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;node-event-simulate&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">NODEBASE</span><span class="o">,</span> <span class="s1">&#39;event-simulate&#39;</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">anim</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">BASE</span><span class="o">,</span> <span class="nx">NODE</span><span class="o">],</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>

                <span class="s1">&#39;anim-base&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">BASE</span><span class="o">,</span> <span class="s1">&#39;node-style&#39;</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;anim-color&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">ANIMBASE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;anim-curve&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;anim-xy&#39;</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;anim-easing&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">ANIMBASE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;anim-scroll&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">ANIMBASE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;anim-xy&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">ANIMBASE</span><span class="o">,</span> <span class="s1">&#39;node-screen&#39;</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;anim-node-plugin&#39;</span><span class="o">:</span> <span class="o">{</span>
                     <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">NODE</span><span class="o">,</span> <span class="nx">ANIMBASE</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">attribute</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">EVENTCUSTOM</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">base</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>

                <span class="s1">&#39;base-base&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;attribute&#39;</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;base-build&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;base-base&#39;</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">cache</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">PLUGIN</span><span class="o">]</span>
        <span class="o">},</span>
        
        <span class="nx">compat</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">NODE</span><span class="o">,</span> <span class="nx">DUMP</span><span class="o">,</span> <span class="nx">SUBSTITUTE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">classnamemanager</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">collection</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">OOP</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">console</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">WIDGET</span><span class="o">,</span> <span class="nx">SUBSTITUTE</span><span class="o">],</span>
            <span class="nx">skinnable</span><span class="o">:</span> <span class="kc">true</span><span class="o">,</span>
            <span class="nx">plugins</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;console-filters&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">PLUGIN</span><span class="o">],</span>
                    <span class="nx">skinnable</span><span class="o">:</span> <span class="kc">true</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>
        
        <span class="nx">cookie</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">dataschema</span><span class="o">:{</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;dataschema-base&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">BASE</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;dataschema-array&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASCHEMABASE</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;dataschema-json&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASCHEMABASE</span><span class="o">,</span> <span class="s1">&#39;json&#39;</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;dataschema-text&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASCHEMABASE</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;dataschema-xml&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASCHEMABASE</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">datasource</span><span class="o">:{</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;datasource-local&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">BASE</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-arrayschema&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">,</span> <span class="nx">PLUGIN</span><span class="o">,</span> <span class="s1">&#39;dataschema-array&#39;</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-cache&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">,</span> <span class="s1">&#39;cache&#39;</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-function&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-jsonschema&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">,</span> <span class="nx">PLUGIN</span><span class="o">,</span> <span class="s1">&#39;dataschema-json&#39;</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-polling&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-get&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">,</span> <span class="nx">GET</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-textschema&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">,</span> <span class="nx">PLUGIN</span><span class="o">,</span> <span class="s1">&#39;dataschema-text&#39;</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-io&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">,</span> <span class="nx">IOBASE</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datasource-xmlschema&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DATASOURCELOCAL</span><span class="o">,</span> <span class="nx">PLUGIN</span><span class="o">,</span> <span class="s1">&#39;dataschema-xml&#39;</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">datatype</span><span class="o">:{</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;datatype-date&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datatype-number&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;datatype-xml&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">dd</span><span class="o">:{</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;dd-ddm-base&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">NODE</span><span class="o">,</span> <span class="nx">BASE</span><span class="o">]</span>
                <span class="o">},</span> 
                <span class="s1">&#39;dd-ddm&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;dd-ddm-base&#39;</span><span class="o">]</span>
                <span class="o">},</span> 
                <span class="s1">&#39;dd-ddm-drop&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;dd-ddm&#39;</span><span class="o">]</span>
                <span class="o">},</span> 
                <span class="s1">&#39;dd-drag&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;dd-ddm-base&#39;</span><span class="o">]</span>
                <span class="o">},</span> 
                <span class="s1">&#39;dd-drop&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;dd-ddm-drop&#39;</span><span class="o">]</span>
                <span class="o">},</span> 
                <span class="s1">&#39;dd-proxy&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DDDRAG</span><span class="o">]</span>
                <span class="o">},</span> 
                <span class="s1">&#39;dd-constrain&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DDDRAG</span><span class="o">]</span>
                <span class="o">},</span> 
                <span class="s1">&#39;dd-scroll&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DDDRAG</span><span class="o">]</span>
                <span class="o">},</span> 
                <span class="s1">&#39;dd-plugin&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">DDDRAG</span><span class="o">],</span>
                    <span class="nx">optional</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;dd-constrain&#39;</span><span class="o">,</span> <span class="s1">&#39;dd-proxy&#39;</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;dd-drop-plugin&#39;</span><span class="o">:{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;dd-drop&#39;</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">dump</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">event</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">EVENTCUSTOM</span><span class="o">,</span> <span class="nx">NODE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="s1">&#39;event-custom&#39;</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">OOP</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="s1">&#39;event-simulate&#39;</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">EVENT</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="s1">&#39;node-focusmanager&#39;</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">NODE</span><span class="o">,</span> <span class="nx">PLUGIN</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">get</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">history</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">NODE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">imageloader</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">NODE</span><span class="o">]</span>
        <span class="o">},</span>
        
        <span class="nx">io</span><span class="o">:{</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>

                <span class="s1">&#39;io-base&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">EVENTCUSTOM</span><span class="o">]</span>
                <span class="o">},</span> 

                <span class="s1">&#39;io-xdr&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">IOBASE</span><span class="o">]</span>
                <span class="o">},</span> 

                <span class="s1">&#39;io-form&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">IOBASE</span><span class="o">,</span> <span class="nx">NODE</span><span class="o">]</span>
                <span class="o">},</span> 

                <span class="s1">&#39;io-upload-iframe&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">IOBASE</span><span class="o">,</span> <span class="nx">NODE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;io-queue&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">IOBASE</span><span class="o">,</span> <span class="s1">&#39;queue-promote&#39;</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">json</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;json-parse&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
                <span class="o">},</span>

                <span class="s1">&#39;json-stringify&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">loader</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">GET</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="s1">&#39;node-menunav&#39;</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">NODE</span><span class="o">,</span> <span class="s1">&#39;classnamemanager&#39;</span><span class="o">,</span> <span class="nx">PLUGIN</span><span class="o">,</span> <span class="s1">&#39;node-focusmanager&#39;</span><span class="o">],</span>
            <span class="nx">skinnable</span><span class="o">:</span> <span class="kc">true</span>
        <span class="o">},</span>
        
        <span class="nx">oop</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">overlay</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">WIDGET</span><span class="o">,</span> <span class="nx">WIDGETPOSITION</span><span class="o">,</span> <span class="s1">&#39;widget-position-ext&#39;</span><span class="o">,</span> <span class="s1">&#39;widget-stack&#39;</span><span class="o">,</span> <span class="s1">&#39;widget-stdmod&#39;</span><span class="o">],</span>
            <span class="nx">skinnable</span><span class="o">:</span> <span class="kc">true</span>
        <span class="o">},</span>

        <span class="nx">plugin</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">BASE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">profiler</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">queue</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">submodules</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;queue-base&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;queue-run&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="s1">&#39;queue-base&#39;</span><span class="o">,</span> <span class="nx">EVENTCUSTOM</span><span class="o">]</span>
                <span class="o">}</span>
            <span class="o">},</span>
            <span class="nx">plugins</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;queue-promote&#39;</span><span class="o">:</span> <span class="o">{</span> <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">},</span>

        <span class="nx">slider</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">WIDGET</span><span class="o">,</span> <span class="s1">&#39;dd-constrain&#39;</span><span class="o">],</span>
            <span class="nx">skinnable</span><span class="o">:</span> <span class="kc">true</span>
        <span class="o">},</span>

        <span class="nx">stylesheet</span><span class="o">:</span> <span class="o">{</span> 
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">substitute</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">optional</span><span class="o">:</span> <span class="o">[</span><span class="nx">DUMP</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="nx">widget</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">BASE</span><span class="o">,</span> <span class="nx">NODE</span><span class="o">,</span> <span class="s1">&#39;classnamemanager&#39;</span><span class="o">],</span>
            <span class="nx">plugins</span><span class="o">:</span> <span class="o">{</span>
                <span class="s1">&#39;widget-position&#39;</span><span class="o">:</span> <span class="o">{</span> <span class="o">},</span>
                <span class="s1">&#39;widget-position-ext&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">WIDGETPOSITION</span><span class="o">]</span>
                <span class="o">},</span>
                <span class="s1">&#39;widget-stack&#39;</span><span class="o">:</span> <span class="o">{</span>
                    <span class="nx">skinnable</span><span class="o">:</span> <span class="kc">true</span>
                <span class="o">},</span>
                <span class="s1">&#39;widget-stdmod&#39;</span><span class="o">:</span> <span class="o">{</span> <span class="o">}</span>
            <span class="o">},</span>
            <span class="nx">skinnable</span><span class="o">:</span> <span class="kc">true</span>
        <span class="o">},</span>

        <span class="nx">yui</span><span class="o">:</span> <span class="o">{</span>
            <span class="nx">supersedes</span><span class="o">:</span> <span class="o">[</span><span class="nx">YUIBASE</span><span class="o">,</span> <span class="nx">GET</span><span class="o">,</span> <span class="s1">&#39;loader&#39;</span><span class="o">,</span> <span class="s1">&#39;queue-base&#39;</span><span class="o">]</span>
        <span class="o">},</span>

        <span class="s1">&#39;yui-base&#39;</span><span class="o">:</span> <span class="o">{</span> <span class="o">},</span>

        <span class="nx">test</span><span class="o">:</span> <span class="o">{</span>                                                                                                                                                        
            <span class="nx">requires</span><span class="o">:</span> <span class="o">[</span><span class="nx">SUBSTITUTE</span><span class="o">,</span> <span class="nx">NODE</span><span class="o">,</span> <span class="s1">&#39;json&#39;</span><span class="o">,</span> <span class="s1">&#39;event-simulate&#39;</span><span class="o">]</span>                                                                                                                     
        <span class="o">}</span>  

    <span class="o">}</span>
<span class="o">},</span>

<span class="nx">_path</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">dir</span><span class="o">,</span> <span class="nx">file</span><span class="o">,</span> <span class="nx">type</span><span class="o">)</span> <span class="o">{</span>
    <span class="k">return</span> <span class="nx">dir</span> <span class="o">+</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="nx">file</span> <span class="o">+</span> <span class="s1">&#39;-min.&#39;</span> <span class="o">+</span> <span class="o">(</span><span class="nx">type</span> <span class="o">||</span> <span class="nx">CSS</span><span class="o">);</span>
<span class="o">},</span>

<span class="nx">_queue</span> <span class="o">=</span> <span class="nx">YUI</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">_loaderQueue</span><span class="o">,</span>

<span class="nx">mods</span>  <span class="o">=</span> <span class="nx">META</span><span class="o">.</span><span class="nx">modules</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">bname</span><span class="o">,</span> <span class="nx">mname</span><span class="o">,</span> <span class="nx">contextname</span><span class="o">,</span>
<span class="nx">L</span>     <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Lang</span><span class="o">,</span> 
<span class="nx">PROV</span>  <span class="o">=</span> <span class="s2">&quot;_provides&quot;</span><span class="o">,</span> 
<span class="nx">SUPER</span> <span class="o">=</span> <span class="s2">&quot;_supersedes&quot;</span><span class="o">;</span>

<span class="c">// Create the metadata for both the regular and context-aware</span>
<span class="c">// versions of the YUI CSS foundation.</span>
<span class="c"></span><span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">YUI_CSS</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
    <span class="nx">bname</span> <span class="o">=</span> <span class="nx">YUI_CSS</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>
    <span class="nx">mname</span> <span class="o">=</span> <span class="nx">CSS</span> <span class="o">+</span> <span class="nx">bname</span><span class="o">;</span>

    <span class="nx">mods</span><span class="o">[</span><span class="nx">mname</span><span class="o">]</span> <span class="o">=</span> <span class="o">{</span>
        <span class="nx">type</span><span class="o">:</span> <span class="nx">CSS</span><span class="o">,</span>
        <span class="nx">path</span><span class="o">:</span> <span class="nx">_path</span><span class="o">(</span><span class="nx">mname</span><span class="o">,</span> <span class="nx">bname</span><span class="o">)</span>
    <span class="o">};</span>

    <span class="c">// define -context module</span>
<span class="c"></span>    <span class="nx">contextname</span> <span class="o">=</span> <span class="nx">mname</span> <span class="o">+</span> <span class="nx">CONTEXT</span><span class="o">;</span>
    <span class="nx">bname</span> <span class="o">=</span> <span class="nx">bname</span> <span class="o">+</span> <span class="nx">CONTEXT</span><span class="o">;</span>

    <span class="nx">mods</span><span class="o">[</span><span class="nx">contextname</span><span class="o">]</span> <span class="o">=</span> <span class="o">{</span>
        <span class="nx">type</span><span class="o">:</span> <span class="nx">CSS</span><span class="o">,</span>
        <span class="nx">path</span><span class="o">:</span> <span class="nx">_path</span><span class="o">(</span><span class="nx">mname</span><span class="o">,</span> <span class="nx">bname</span><span class="o">)</span>
    <span class="o">};</span>

    <span class="k">if</span> <span class="o">(</span><span class="nx">mname</span> <span class="o">==</span> <span class="nx">CSSGRIDS</span><span class="o">)</span> <span class="o">{</span>
        <span class="nx">mods</span><span class="o">[</span><span class="nx">mname</span><span class="o">].</span><span class="nx">requires</span> <span class="o">=</span> <span class="o">[</span><span class="nx">CSSFONTS</span><span class="o">];</span>
        <span class="nx">mods</span><span class="o">[</span><span class="nx">mname</span><span class="o">].</span><span class="nx">optional</span> <span class="o">=</span> <span class="o">[</span><span class="nx">CSSRESET</span><span class="o">];</span>
        <span class="nx">mods</span><span class="o">[</span><span class="nx">contextname</span><span class="o">].</span><span class="nx">requires</span> <span class="o">=</span> <span class="o">[</span><span class="nx">CSSFONTS</span> <span class="o">+</span> <span class="nx">CONTEXT</span><span class="o">];</span>
        <span class="nx">mods</span><span class="o">[</span><span class="nx">contextname</span><span class="o">].</span><span class="nx">optional</span> <span class="o">=</span> <span class="o">[</span><span class="nx">CSSRESET</span> <span class="o">+</span> <span class="nx">CONTEXT</span><span class="o">];</span>
    <span class="o">}</span> <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="nx">mname</span> <span class="o">==</span> <span class="nx">CSSBASE</span><span class="o">)</span> <span class="o">{</span>
        <span class="nx">mods</span><span class="o">[</span><span class="nx">mname</span><span class="o">].</span><span class="nx">after</span> <span class="o">=</span> <span class="nx">CSS_AFTER</span><span class="o">;</span>
        <span class="nx">mods</span><span class="o">[</span><span class="nx">contextname</span><span class="o">].</span><span class="nx">after</span> <span class="o">=</span> <span class="nx">CSS_AFTER</span><span class="o">;</span>
    <span class="o">}</span>
<span class="o">}</span>

<span class="nx">Y</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">meta</span> <span class="o">=</span> <span class="nx">META</span><span class="o">;</span>

<span class="nx">GLOBAL_LOADED</span> <span class="o">=</span> <span class="nx">GLOBAL_ENV</span><span class="o">.</span><span class="nx">_loaded</span><span class="o">;</span>

<span class="nx">Y</span><span class="o">.</span><span class="nx">Loader</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>

    <span class="c">/**</span>
<span class="c">     * Internal callback to handle multiple internal insert() calls</span>
<span class="c">     * so that css is inserted prior to js</span>
<span class="c">     * @property _internalCallback</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">_internalCallback</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Use the YUI environment listener to detect script load.  This</span>
<span class="c">     * is only switched on for Safari 2.x and below.</span>
<span class="c">     * @property _useYahooListener</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">_useYahooListener</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Callback that will be executed when the loader is finished</span>
<span class="c">     * with an insert</span>
<span class="c">     * @method onSuccess</span>
<span class="c">     * @type function</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">onSuccess</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Callback that will be executed if there is a failure</span>
<span class="c">     * @method onFailure</span>
<span class="c">     * @type function</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">onFailure</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Callback for the &#39;CSSComplete&#39; event.  When loading YUI components with CSS</span>
<span class="c">     * the CSS is loaded first, then the script.  This provides a moment you can tie into to improve</span>
<span class="c">     * the presentation of the page while the script is loading.</span>
<span class="c">     * @method onCSS</span>
<span class="c">     * @type function</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">onCSS</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Callback executed each time a script or css file is loaded</span>
<span class="c">     * @method onProgress</span>
<span class="c">     * @type function</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">onProgress</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Callback that will be executed if a timeout occurs</span>
<span class="c">     * @method onTimeout</span>
<span class="c">     * @type function</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">onTimeout</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * The execution context for all callbacks</span>
<span class="c">     * @property context</span>
<span class="c">     * @default {YUI} the YUI instance</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">context</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Data that is passed to all callbacks</span>
<span class="c">     * @property data</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">data</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Node reference or id where new nodes should be inserted before</span>
<span class="c">     * @property insertBefore</span>
<span class="c">     * @type string|HTMLElement</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">insertBefore</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * The charset attribute for inserted nodes</span>
<span class="c">     * @property charset</span>
<span class="c">     * @type string</span>
<span class="c">     * @deprecated, use cssAttributes or jsAttributes</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">charset</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * An object literal containing attributes to add to link nodes</span>
<span class="c">     * @property cssAttributes</span>
<span class="c">     * @type object</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">cssAttributes</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * An object literal containing attributes to add to script nodes</span>
<span class="c">     * @property jsAttributes</span>
<span class="c">     * @type object</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">jsAttributes</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * The base directory.</span>
<span class="c">     * @property base</span>
<span class="c">     * @type string</span>
<span class="c">     * @default http://yui.yahooapis.com/[YUI VERSION]/build/</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">base</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">meta</span><span class="o">.</span><span class="nx">base</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Base path for the combo service</span>
<span class="c">     * @property comboBase</span>
<span class="c">     * @type string</span>
<span class="c">     * @default http://yui.yahooapis.com/combo?</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">comboBase</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">meta</span><span class="o">.</span><span class="nx">comboBase</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * If configured, YUI JS resources will use the combo</span>
<span class="c">     * handler</span>
<span class="c">     * @property combine</span>
<span class="c">     * @type boolean</span>
<span class="c">     * @default true if a base dir isn&#39;t in the config</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">combine</span> <span class="o">=</span> <span class="o">(!(</span><span class="nx">BASE</span> <span class="k">in</span> <span class="nx">o</span><span class="o">));</span>

    <span class="c">/**</span>
<span class="c">     * Ignore modules registered on the YUI global</span>
<span class="c">     * @property ignoreRegistered</span>
<span class="c">     * @default false</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">ignoreRegistered</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Root path to prepend to module path for the combo</span>
<span class="c">     * service</span>
<span class="c">     * @property root</span>
<span class="c">     * @type string</span>
<span class="c">     * @default [YUI VERSION]/build/</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">root</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">meta</span><span class="o">.</span><span class="nx">root</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Timeout value in milliseconds.  If set, this value will be used by</span>
<span class="c">     * the get utility.  the timeout event will fire if</span>
<span class="c">     * a timeout occurs.</span>
<span class="c">     * @property timeout</span>
<span class="c">     * @type int</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">timeout</span> <span class="o">=</span> <span class="m">0</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * A list of modules that should not be loaded, even if</span>
<span class="c">     * they turn up in the dependency tree</span>
<span class="c">     * @property ignore</span>
<span class="c">     * @type string[]</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">ignore</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * A list of modules that should always be loaded, even</span>
<span class="c">     * if they have already been inserted into the page.</span>
<span class="c">     * @property force</span>
<span class="c">     * @type string[]</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">force</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="k">this</span><span class="o">.</span><span class="nx">forceMap</span> <span class="o">=</span> <span class="o">{};</span>

    <span class="c">/**</span>
<span class="c">     * Should we allow rollups</span>
<span class="c">     * @property allowRollup</span>
<span class="c">     * @type boolean</span>
<span class="c">     * @default true</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">allowRollup</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * A filter to apply to result urls.  This filter will modify the default</span>
<span class="c">     * path for all modules.  The default path for the YUI library is the</span>
<span class="c">     * minified version of the files (e.g., event-min.js).  The filter property</span>
<span class="c">     * can be a predefined filter or a custom filter.  The valid predefined </span>
<span class="c">     * filters are:</span>
<span class="c">     * &lt;dl&gt;</span>
<span class="c">     *  &lt;dt&gt;DEBUG&lt;/dt&gt;</span>
<span class="c">     *  &lt;dd&gt;Selects the debug versions of the library (e.g., event-debug.js).</span>
<span class="c">     *      This option will automatically include the Logger widget&lt;/dd&gt;</span>
<span class="c">     *  &lt;dt&gt;RAW&lt;/dt&gt;</span>
<span class="c">     *  &lt;dd&gt;Selects the non-minified version of the library (e.g., event.js).&lt;/dd&gt;</span>
<span class="c">     * &lt;/dl&gt;</span>
<span class="c">     * You can also define a custom filter, which must be an object literal </span>
<span class="c">     * containing a search expression and a replace string:</span>
<span class="c">     * &lt;pre&gt;</span>
<span class="c">     *  myFilter: &amp;#123; </span>
<span class="c">     *      &#39;searchExp&#39;: &quot;-min\\.js&quot;, </span>
<span class="c">     *      &#39;replaceStr&#39;: &quot;-debug.js&quot;</span>
<span class="c">     *  &amp;#125;</span>
<span class="c">     * &lt;/pre&gt;</span>
<span class="c">     * @property filter</span>
<span class="c">     * @type string|{searchExp: string, replaceStr: string}</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">filter</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * per-component filter specification.  If specified for a given component, this </span>
<span class="c">     * overrides the filter config.</span>
<span class="c">     * @property filters</span>
<span class="c">     * @type object</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">filters</span> <span class="o">=</span> <span class="o">{};</span>

    <span class="c">/**</span>
<span class="c">     * The list of requested modules</span>
<span class="c">     * @property required</span>
<span class="c">     * @type {string: boolean}</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">required</span> <span class="o">=</span> <span class="o">{};</span>

    <span class="c">/**</span>
<span class="c">     * The library metadata</span>
<span class="c">     * @property moduleInfo</span>
<span class="c">     */</span>
    <span class="c">// this.moduleInfo = Y.merge(Y.Env.meta.moduleInfo);</span>
<span class="c"></span>    <span class="k">this</span><span class="o">.</span><span class="nx">moduleInfo</span> <span class="o">=</span> <span class="o">{};</span>

    <span class="c">/**</span>
<span class="c">     * Provides the information used to skin the skinnable components.</span>
<span class="c">     * The following skin definition would result in &#39;skin1&#39; and &#39;skin2&#39;</span>
<span class="c">     * being loaded for calendar (if calendar was requested), and</span>
<span class="c">     * &#39;sam&#39; for all other skinnable components:</span>
<span class="c">     *</span>
<span class="c">     *   &lt;code&gt;</span>
<span class="c">     *   skin: {</span>
<span class="c">     *</span>
<span class="c">     *      // The default skin, which is automatically applied if not</span>
<span class="c">     *      // overriden by a component-specific skin definition.</span>
<span class="c">     *      // Change this in to apply a different skin globally</span>
<span class="c">     *      defaultSkin: &#39;sam&#39;, </span>
<span class="c">     *</span>
<span class="c">     *      // This is combined with the loader base property to get</span>
<span class="c">     *      // the default root directory for a skin. ex:</span>
<span class="c">     *      // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/</span>
<span class="c">     *      base: &#39;assets/skins/&#39;,</span>
<span class="c">     *</span>
<span class="c">     *      // The name of the rollup css file for the skin</span>
<span class="c">     *      path: &#39;skin.css&#39;,</span>
<span class="c">     *</span>
<span class="c">     *      // The number of skinnable components requested that are</span>
<span class="c">     *      // required before using the rollup file rather than the</span>
<span class="c">     *      // individual component css files</span>
<span class="c">     *      rollup: 3,</span>
<span class="c">     *</span>
<span class="c">     *      // Any component-specific overrides can be specified here,</span>
<span class="c">     *      // making it possible to load different skins for different</span>
<span class="c">     *      // components.  It is possible to load more than one skin</span>
<span class="c">     *      // for a given component as well.</span>
<span class="c">     *      overrides: {</span>
<span class="c">     *          calendar: [&#39;skin1&#39;, &#39;skin2&#39;]</span>
<span class="c">     *      }</span>
<span class="c">     *   }</span>
<span class="c">     *   &lt;/code&gt;</span>
<span class="c">     *   @property skin</span>
<span class="c">     */</span>
     <span class="k">this</span><span class="o">.</span><span class="nx">skin</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">merge</span><span class="o">(</span><span class="nx">Y</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">meta</span><span class="o">.</span><span class="nx">skin</span><span class="o">);</span>
    
    <span class="k">var</span> <span class="nx">defaults</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Env</span><span class="o">.</span><span class="nx">meta</span><span class="o">.</span><span class="nx">modules</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>

    <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">defaults</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">defaults</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_internal</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">addModule</span><span class="o">(</span><span class="nx">defaults</span><span class="o">[</span><span class="nx">i</span><span class="o">],</span> <span class="nx">i</span><span class="o">);</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_internal</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
        <span class="o">}</span>
    <span class="o">}</span>

    <span class="c">/**</span>
<span class="c">     * List of rollup files found in the library metadata</span>
<span class="c">     * @property rollups</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">rollups</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Whether or not to load optional dependencies for </span>
<span class="c">     * the requested modules</span>
<span class="c">     * @property loadOptional</span>
<span class="c">     * @type boolean</span>
<span class="c">     * @default false</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">loadOptional</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * All of the derived dependencies in sorted order, which</span>
<span class="c">     * will be populated when either calculate() or insert()</span>
<span class="c">     * is called</span>
<span class="c">     * @property sorted</span>
<span class="c">     * @type string[]</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">sorted</span> <span class="o">=</span> <span class="o">[];</span>

    <span class="c">/**</span>
<span class="c">     * Set when beginning to compute the dependency tree. </span>
<span class="c">     * Composed of what YUI reports to be loaded combined</span>
<span class="c">     * with what has been loaded by any instance on the page</span>
<span class="c">     * with the version number specified in the metadata.</span>
<span class="c">     * @propery loaded</span>
<span class="c">     * @type {string: boolean}</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">loaded</span> <span class="o">=</span> <span class="nx">GLOBAL_LOADED</span><span class="o">[</span><span class="nx">VERSION</span><span class="o">];</span>

    <span class="c">/**</span>
<span class="c">     * A list of modules to attach to the YUI instance when complete.</span>
<span class="c">     * If not supplied, the sorted list of dependencies are applied.</span>
<span class="c">     * @property attaching</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">attaching</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * Flag to indicate the dependency tree needs to be recomputed</span>
<span class="c">     * if insert is called again.</span>
<span class="c">     * @property dirty</span>
<span class="c">     * @type boolean</span>
<span class="c">     * @default true</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">dirty</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>

    <span class="c">/**</span>
<span class="c">     * List of modules inserted by the utility</span>
<span class="c">     * @property inserted</span>
<span class="c">     * @type {string: boolean}</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">inserted</span> <span class="o">=</span> <span class="o">{};</span>

    <span class="c">/**</span>
<span class="c">     * List of skipped modules during insert() because the module</span>
<span class="c">     * was not defined</span>
<span class="c">     * @property skipped</span>
<span class="c">     */</span>
    <span class="k">this</span><span class="o">.</span><span class="nx">skipped</span> <span class="o">=</span> <span class="o">{};</span>


    <span class="c">// Y.on(&#39;yui:load&#39;, this.loadNext, this);</span>
<span class="c"></span>
    <span class="k">this</span><span class="o">.</span><span class="nx">_config</span><span class="o">(</span><span class="nx">o</span><span class="o">);</span>

<span class="o">};</span>

<span class="nx">Y</span><span class="o">.</span><span class="nx">Loader</span><span class="o">.</span><span class="nx">prototype</span> <span class="o">=</span> <span class="o">{</span>

    <span class="nx">FILTER_DEFS</span><span class="o">:</span> <span class="o">{</span>
        <span class="nx">RAW</span><span class="o">:</span> <span class="o">{</span> 
            <span class="s1">&#39;searchExp&#39;</span><span class="o">:</span> <span class="s2">&quot;-min\\.js&quot;</span><span class="o">,</span> 
            <span class="s1">&#39;replaceStr&#39;</span><span class="o">:</span> <span class="s2">&quot;.js&quot;</span>
        <span class="o">},</span>
        <span class="nx">DEBUG</span><span class="o">:</span> <span class="o">{</span> 
            <span class="s1">&#39;searchExp&#39;</span><span class="o">:</span> <span class="s2">&quot;-min\\.js&quot;</span><span class="o">,</span> 
            <span class="s1">&#39;replaceStr&#39;</span><span class="o">:</span> <span class="s2">&quot;-debug.js&quot;</span>
        <span class="o">}</span>
    <span class="o">},</span>

    <span class="nx">SKIN_PREFIX</span><span class="o">:</span> <span class="s2">&quot;skin-&quot;</span><span class="o">,</span>

    <span class="nx">_config</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">val</span><span class="o">,</span> <span class="nx">f</span><span class="o">;</span>

        <span class="c">// apply config values</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">if</span> <span class="o">(</span><span class="nx">o</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>
                    <span class="nx">val</span> <span class="o">=</span> <span class="nx">o</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>
                    <span class="k">if</span> <span class="o">(</span><span class="nx">i</span> <span class="o">==</span> <span class="s1">&#39;require&#39;</span><span class="o">)</span> <span class="o">{</span>
                        <span class="k">this</span><span class="o">.</span><span class="nx">require</span><span class="o">(</span><span class="nx">val</span><span class="o">);</span>
                    <span class="o">}</span> <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="nx">i</span> <span class="o">==</span> <span class="s1">&#39;modules&#39;</span><span class="o">)</span> <span class="o">{</span>

                        <span class="c">// add a hash of module definitions</span>
<span class="c"></span>                        <span class="k">for</span> <span class="o">(</span><span class="nx">j</span> <span class="k">in</span> <span class="nx">val</span><span class="o">)</span> <span class="o">{</span>
                            <span class="k">if</span> <span class="o">(</span><span class="nx">val</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">j</span><span class="o">))</span> <span class="o">{</span>
                                <span class="k">this</span><span class="o">.</span><span class="nx">addModule</span><span class="o">(</span><span class="nx">val</span><span class="o">[</span><span class="nx">j</span><span class="o">],</span> <span class="nx">j</span><span class="o">);</span>
                            <span class="o">}</span>
                        <span class="o">}</span>

                    <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
                        <span class="k">this</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">=</span> <span class="nx">val</span><span class="o">;</span>
                    <span class="o">}</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="c">// fix filter</span>
<span class="c"></span>        <span class="nx">f</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">filter</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">L</span><span class="o">.</span><span class="nx">isString</span><span class="o">(</span><span class="nx">f</span><span class="o">))</span> <span class="o">{</span>
            <span class="nx">f</span> <span class="o">=</span> <span class="nx">f</span><span class="o">.</span><span class="nx">toUpperCase</span><span class="o">();</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">filterName</span> <span class="o">=</span> <span class="nx">f</span><span class="o">;</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">filter</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">FILTER_DEFS</span><span class="o">[</span><span class="nx">f</span><span class="o">];</span>
        <span class="o">}</span>

    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Returns the skin module name for the specified skin name.  If a</span>
<span class="c">     * module name is supplied, the returned skin module name is </span>
<span class="c">     * specific to the module passed in.</span>
<span class="c">     * @method formatSkin</span>
<span class="c">     * @param skin {string} the name of the skin</span>
<span class="c">     * @param mod {string} optional: the name of a module to skin</span>
<span class="c">     * @return {string} the full skin module name</span>
<span class="c">     */</span>
    <span class="nx">formatSkin</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">skin</span><span class="o">,</span> <span class="nx">mod</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">var</span> <span class="nx">s</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">SKIN_PREFIX</span> <span class="o">+</span> <span class="nx">skin</span><span class="o">;</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">mod</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">s</span> <span class="o">=</span> <span class="nx">s</span> <span class="o">+</span> <span class="s2">&quot;-&quot;</span> <span class="o">+</span> <span class="nx">mod</span><span class="o">;</span>
        <span class="o">}</span>

        <span class="k">return</span> <span class="nx">s</span><span class="o">;</span>
    <span class="o">},</span>

    <span class="c">/*</span>
<span class="c">     * Reverses &lt;code&gt;formatSkin&lt;/code&gt;, providing the skin name and</span>
<span class="c">     * module name if the string matches the pattern for skins.</span>
<span class="c">     * @method parseSkin</span>
<span class="c">     * @param mod {string} the module name to parse</span>
<span class="c">     * @return {skin: string, module: string} the parsed skin name </span>
<span class="c">     * and module name, or null if the supplied string does not match</span>
<span class="c">     * the skin pattern</span>
<span class="c">     * </span>
<span class="c">     * This isn&#39;t being used at the moment</span>
<span class="c">     *</span>
<span class="c">     */</span>
    <span class="c">// parseSkin: function(mod) {</span>
<span class="c"></span>    <span class="c">//     </span>
<span class="c"></span>    <span class="c">//     if (mod.indexOf(this.SKIN_PREFIX) === 0) {</span>
<span class="c"></span>    <span class="c">//         var a = mod.split(&quot;-&quot;);</span>
<span class="c"></span>    <span class="c">//         return {skin: a[1], module: a[2]};</span>
<span class="c"></span>    <span class="c">//     } </span>
<span class="c"></span>    <span class="c">//     return null;</span>
<span class="c"></span>    <span class="c">// },</span>
<span class="c"></span>
    <span class="c">/**</span>
<span class="c">     * Adds the skin def to the module info</span>
<span class="c">     * @method _addSkin</span>
<span class="c">     * @param skin {string} the name of the skin</span>
<span class="c">     * @param mod {string} the name of the module</span>
<span class="c">     * @param parent {string} parent module if this is a skin of a</span>
<span class="c">     * submodule or plugin</span>
<span class="c">     * @return {string} the module name for the skin</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_addSkin</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">skin</span><span class="o">,</span> <span class="nx">mod</span><span class="o">,</span> <span class="nx">parent</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">name</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">formatSkin</span><span class="o">(</span><span class="nx">skin</span><span class="o">),</span> 
            <span class="nx">info</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">moduleInfo</span><span class="o">,</span>
            <span class="nx">sinf</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">skin</span><span class="o">,</span> 
            <span class="nx">ext</span>  <span class="o">=</span> <span class="nx">info</span><span class="o">[</span><span class="nx">mod</span><span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="nx">info</span><span class="o">[</span><span class="nx">mod</span><span class="o">].</span><span class="nx">ext</span><span class="o">,</span>
            <span class="nx">mdef</span><span class="o">,</span> <span class="nx">pkg</span><span class="o">;</span>

        <span class="c">/*</span>
<span class="c">        // Add a module definition for the skin rollup css</span>
<span class="c">        // Y.log(&#39;ext? &#39; + mod + &quot;: &quot; + ext);</span>
<span class="c">        if (!info[name]) {</span>
<span class="c">            // Y.log(&#39;adding skin &#39; + name);</span>
<span class="c">            this.addModule({</span>
<span class="c">                &#39;name&#39;: name,</span>
<span class="c">                &#39;type&#39;: &#39;css&#39;,</span>
<span class="c">                &#39;path&#39;: sinf.base + skin + &#39;/&#39; + sinf.path,</span>
<span class="c">                //&#39;supersedes&#39;: &#39;*&#39;,</span>
<span class="c">                &#39;after&#39;: sinf.after,</span>
<span class="c">                &#39;rollup&#39;: sinf.rollup,</span>
<span class="c">                &#39;ext&#39;: ext</span>
<span class="c">            });</span>
<span class="c">        }</span>
<span class="c">        */</span>

        <span class="c">// Add a module definition for the module-specific skin css</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="nx">mod</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">name</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">formatSkin</span><span class="o">(</span><span class="nx">skin</span><span class="o">,</span> <span class="nx">mod</span><span class="o">);</span>
            <span class="k">if</span> <span class="o">(!</span><span class="nx">info</span><span class="o">[</span><span class="nx">name</span><span class="o">])</span> <span class="o">{</span>
                <span class="nx">mdef</span> <span class="o">=</span> <span class="nx">info</span><span class="o">[</span><span class="nx">mod</span><span class="o">];</span>
                <span class="nx">pkg</span> <span class="o">=</span> <span class="nx">mdef</span><span class="o">.</span><span class="nx">pkg</span> <span class="o">||</span> <span class="nx">mod</span><span class="o">;</span>
                <span class="c">// Y.log(&#39;adding skin &#39; + name);</span>
<span class="c"></span>                <span class="k">this</span><span class="o">.</span><span class="nx">addModule</span><span class="o">({</span>
                    <span class="s1">&#39;name&#39;</span><span class="o">:</span> <span class="nx">name</span><span class="o">,</span>
                    <span class="s1">&#39;type&#39;</span><span class="o">:</span> <span class="s1">&#39;css&#39;</span><span class="o">,</span>
                    <span class="s1">&#39;after&#39;</span><span class="o">:</span> <span class="nx">sinf</span><span class="o">.</span><span class="nx">after</span><span class="o">,</span>
                    <span class="s1">&#39;path&#39;</span><span class="o">:</span> <span class="o">(</span><span class="nx">parent</span> <span class="o">||</span> <span class="nx">pkg</span><span class="o">)</span> <span class="o">+</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="nx">sinf</span><span class="o">.</span><span class="nx">base</span> <span class="o">+</span> <span class="nx">skin</span> <span class="o">+</span> <span class="s1">&#39;/&#39;</span> <span class="o">+</span> <span class="nx">mod</span> <span class="o">+</span> <span class="s1">&#39;.css&#39;</span><span class="o">,</span>
                    <span class="s1">&#39;ext&#39;</span><span class="o">:</span> <span class="nx">ext</span>
                <span class="o">});</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="k">return</span> <span class="nx">name</span><span class="o">;</span>
    <span class="o">},</span>

    <span class="c">/** Add a new module to the component metadata.         </span>
<span class="c">     * &lt;dl&gt;</span>
<span class="c">     *     &lt;dt&gt;name:&lt;/dt&gt;       &lt;dd&gt;required, the component name&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;type:&lt;/dt&gt;       &lt;dd&gt;required, the component type (js or css)&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;path:&lt;/dt&gt;       &lt;dd&gt;required, the path to the script from &quot;base&quot;&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;requires:&lt;/dt&gt;   &lt;dd&gt;array of modules required by this component&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;optional:&lt;/dt&gt;   &lt;dd&gt;array of optional modules for this component&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;supersedes:&lt;/dt&gt; &lt;dd&gt;array of the modules this component replaces&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;after:&lt;/dt&gt;      &lt;dd&gt;array of modules the components which, if present, should be sorted above this one&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;rollup:&lt;/dt&gt;     &lt;dd&gt;the number of superseded modules required for automatic rollup&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;fullpath:&lt;/dt&gt;   &lt;dd&gt;If fullpath is specified, this is used instead of the configured base + path&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;skinnable:&lt;/dt&gt;  &lt;dd&gt;flag to determine if skin assets should automatically be pulled in&lt;/dd&gt;</span>
<span class="c">     *     &lt;dt&gt;submodules:&lt;/dt&gt; &lt;dd&gt;a has of submodules&lt;/dd&gt;</span>
<span class="c">     * &lt;/dl&gt;</span>
<span class="c">     * @method addModule</span>
<span class="c">     * @param o An object containing the module data</span>
<span class="c">     * @param name the module name (optional), required if not in the module data</span>
<span class="c">     * @return {boolean} true if the module was added, false if </span>
<span class="c">     * the object passed in did not provide all required attributes</span>
<span class="c">     */</span>
    <span class="nx">addModule</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">,</span> <span class="nx">name</span><span class="o">)</span> <span class="o">{</span>

        <span class="nx">name</span> <span class="o">=</span> <span class="nx">name</span> <span class="o">||</span> <span class="nx">o</span><span class="o">.</span><span class="nx">name</span><span class="o">;</span>
        <span class="nx">o</span><span class="o">.</span><span class="nx">name</span> <span class="o">=</span> <span class="nx">name</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(!</span><span class="nx">o</span> <span class="o">||</span> <span class="o">!</span><span class="nx">o</span><span class="o">.</span><span class="nx">name</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
        <span class="o">}</span>

        <span class="k">if</span> <span class="o">(!</span><span class="nx">o</span><span class="o">.</span><span class="nx">type</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">o</span><span class="o">.</span><span class="nx">type</span> <span class="o">=</span> <span class="nx">JS</span><span class="o">;</span>
        <span class="o">}</span>

        <span class="k">if</span> <span class="o">(!</span><span class="nx">o</span><span class="o">.</span><span class="nx">path</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">o</span><span class="o">.</span><span class="nx">fullpath</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// o.path = name + &quot;/&quot; + name + &quot;-min.&quot; + o.type;</span>
<span class="c"></span>            <span class="nx">o</span><span class="o">.</span><span class="nx">path</span> <span class="o">=</span> <span class="nx">_path</span><span class="o">(</span><span class="nx">name</span><span class="o">,</span> <span class="nx">name</span><span class="o">,</span> <span class="nx">o</span><span class="o">.</span><span class="nx">type</span><span class="o">);</span>
        <span class="o">}</span>

        <span class="nx">o</span><span class="o">.</span><span class="nx">ext</span> <span class="o">=</span> <span class="o">(</span><span class="s1">&#39;ext&#39;</span> <span class="k">in</span> <span class="nx">o</span><span class="o">)</span> <span class="o">?</span> <span class="nx">o</span><span class="o">.</span><span class="nx">ext</span> <span class="o">:</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_internal</span><span class="o">)</span> <span class="o">?</span> <span class="kc">false</span> <span class="o">:</span> <span class="kc">true</span><span class="o">;</span>
        <span class="nx">o</span><span class="o">.</span><span class="nx">requires</span> <span class="o">=</span> <span class="nx">o</span><span class="o">.</span><span class="nx">requires</span> <span class="o">||</span> <span class="o">[];</span>

        <span class="c">// Y.log(&#39;New module &#39; + name);</span>
<span class="c"></span>
        <span class="k">this</span><span class="o">.</span><span class="nx">moduleInfo</span><span class="o">[</span><span class="nx">name</span><span class="o">]</span> <span class="o">=</span> <span class="nx">o</span><span class="o">;</span>

        <span class="c">// Handle submodule logic</span>
<span class="c"></span>        <span class="k">var</span> <span class="nx">subs</span> <span class="o">=</span> <span class="nx">o</span><span class="o">.</span><span class="nx">submodules</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">l</span><span class="o">,</span> <span class="nx">sup</span><span class="o">,</span> <span class="nx">s</span><span class="o">,</span> <span class="nx">smod</span><span class="o">,</span> <span class="nx">plugins</span><span class="o">,</span> <span class="nx">plug</span><span class="o">;</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">subs</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">sup</span> <span class="o">=</span> <span class="o">[];</span> 
            <span class="nx">l</span>   <span class="o">=</span> <span class="m">0</span><span class="o">;</span>

            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">subs</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">if</span> <span class="o">(</span><span class="nx">subs</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>
                    <span class="nx">s</span> <span class="o">=</span> <span class="nx">subs</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>
                    <span class="nx">s</span><span class="o">.</span><span class="nx">path</span> <span class="o">=</span> <span class="nx">_path</span><span class="o">(</span><span class="nx">name</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">o</span><span class="o">.</span><span class="nx">type</span><span class="o">);</span>
                    <span class="k">this</span><span class="o">.</span><span class="nx">addModule</span><span class="o">(</span><span class="nx">s</span><span class="o">,</span> <span class="nx">i</span><span class="o">);</span>
                    <span class="nx">sup</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">i</span><span class="o">);</span>

                    <span class="k">if</span> <span class="o">(</span><span class="nx">o</span><span class="o">.</span><span class="nx">skinnable</span><span class="o">)</span> <span class="o">{</span>
                        <span class="nx">smod</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_addSkin</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">skin</span><span class="o">.</span><span class="nx">defaultSkin</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">name</span><span class="o">);</span>
                        <span class="nx">sup</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">smod</span><span class="o">.</span><span class="nx">name</span><span class="o">);</span>
                    <span class="o">}</span>

                    <span class="nx">l</span><span class="o">++;</span>
                <span class="o">}</span>
            <span class="o">}</span>

            <span class="nx">o</span><span class="o">.</span><span class="nx">supersedes</span> <span class="o">=</span> <span class="nx">sup</span><span class="o">;</span>
            <span class="nx">o</span><span class="o">.</span><span class="nx">rollup</span> <span class="o">=</span> <span class="nb">Math</span><span class="o">.</span><span class="nx">min</span><span class="o">(</span><span class="nx">l</span><span class="o">-</span><span class="m">1</span><span class="o">,</span> <span class="m">4</span><span class="o">);</span>
        <span class="o">}</span>

        <span class="nx">plugins</span> <span class="o">=</span> <span class="nx">o</span><span class="o">.</span><span class="nx">plugins</span><span class="o">;</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">plugins</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">plugins</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">if</span> <span class="o">(</span><span class="nx">plugins</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>
                    <span class="nx">plug</span> <span class="o">=</span> <span class="nx">plugins</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>
                    <span class="nx">plug</span><span class="o">.</span><span class="nx">path</span> <span class="o">=</span> <span class="nx">_path</span><span class="o">(</span><span class="nx">name</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">o</span><span class="o">.</span><span class="nx">type</span><span class="o">);</span>
                    <span class="nx">plug</span><span class="o">.</span><span class="nx">requires</span> <span class="o">=</span> <span class="nx">plug</span><span class="o">.</span><span class="nx">requires</span> <span class="o">||</span> <span class="o">[];</span>
                    <span class="nx">plug</span><span class="o">.</span><span class="nx">requires</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">name</span><span class="o">);</span>
                    <span class="k">this</span><span class="o">.</span><span class="nx">addModule</span><span class="o">(</span><span class="nx">plug</span><span class="o">,</span> <span class="nx">i</span><span class="o">);</span>
                    <span class="k">if</span> <span class="o">(</span><span class="nx">o</span><span class="o">.</span><span class="nx">skinnable</span><span class="o">)</span> <span class="o">{</span>
                        <span class="k">this</span><span class="o">.</span><span class="nx">_addSkin</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">skin</span><span class="o">.</span><span class="nx">defaultSkin</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">name</span><span class="o">);</span>
                    <span class="o">}</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">dirty</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>

        <span class="k">return</span> <span class="nx">o</span><span class="o">;</span>
    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Add a requirement for one or more module</span>
<span class="c">     * @method require</span>
<span class="c">     * @param what {string[] | string*} the modules to load</span>
<span class="c">     */</span>
    <span class="nx">require</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">what</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">var</span> <span class="nx">a</span> <span class="o">=</span> <span class="o">(</span><span class="k">typeof</span> <span class="nx">what</span> <span class="o">===</span> <span class="s2">&quot;string&quot;</span><span class="o">)</span> <span class="o">?</span> <span class="nx">arguments</span> <span class="o">:</span> <span class="nx">what</span><span class="o">;</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">dirty</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
        <span class="nx">Y</span><span class="o">.</span><span class="nx">mix</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">required</span><span class="o">,</span> <span class="nx">Y</span><span class="o">.</span><span class="nb">Array</span><span class="o">.</span><span class="nx">hash</span><span class="o">(</span><span class="nx">a</span><span class="o">));</span>
    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Returns an object containing properties for all modules required</span>
<span class="c">     * in order to load the requested module</span>
<span class="c">     * @method getRequires</span>
<span class="c">     * @param mod The module definition from moduleInfo</span>
<span class="c">     */</span>
    <span class="nx">getRequires</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">mod</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">if</span> <span class="o">(!</span><span class="nx">mod</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// Y.log(&#39;getRequires, no module&#39;);</span>
<span class="c"></span>            <span class="k">return</span> <span class="o">[];</span>
        <span class="o">}</span>

        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">dirty</span> <span class="o">&amp;&amp;</span> <span class="nx">mod</span><span class="o">.</span><span class="nx">expanded</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// Y.log(&#39;already expanded&#39;);</span>
<span class="c"></span>            <span class="k">return</span> <span class="nx">mod</span><span class="o">.</span><span class="nx">expanded</span><span class="o">;</span>
        <span class="o">}</span>

        <span class="k">var</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">d</span><span class="o">=[],</span> <span class="nx">r</span><span class="o">=</span><span class="nx">mod</span><span class="o">.</span><span class="nx">requires</span><span class="o">,</span> <span class="nx">o</span><span class="o">=</span><span class="nx">mod</span><span class="o">.</span><span class="nx">optional</span><span class="o">,</span> 
            <span class="nx">info</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">moduleInfo</span><span class="o">,</span> <span class="nx">m</span><span class="o">,</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">add</span><span class="o">;</span>

        <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">r</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// Y.log(mod.name + &#39; requiring &#39; + r[i]);</span>
<span class="c"></span>            <span class="nx">d</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
            <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
            <span class="nx">add</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getRequires</span><span class="o">(</span><span class="nx">m</span><span class="o">);</span>
            <span class="k">for</span> <span class="o">(</span><span class="nx">j</span><span class="o">=</span><span class="m">0</span><span class="o">;</span><span class="nx">j</span><span class="o">&lt;</span><span class="nx">add</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span><span class="nx">j</span><span class="o">=</span><span class="nx">j</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">d</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">add</span><span class="o">[</span><span class="nx">j</span><span class="o">]);</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="c">// get the requirements from superseded modules, if any</span>
<span class="c"></span>        <span class="nx">r</span><span class="o">=</span><span class="nx">mod</span><span class="o">.</span><span class="nx">supersedes</span><span class="o">;</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">r</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">r</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                <span class="c">// Y.log(mod.name + &#39; requiring &#39; + r[i]);</span>
<span class="c"></span>                <span class="nx">d</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
                <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
                <span class="nx">add</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getRequires</span><span class="o">(</span><span class="nx">m</span><span class="o">);</span>
                <span class="k">for</span> <span class="o">(</span><span class="nx">j</span><span class="o">=</span><span class="m">0</span><span class="o">;</span><span class="nx">j</span><span class="o">&lt;</span><span class="nx">add</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span><span class="nx">j</span><span class="o">=</span><span class="nx">j</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                    <span class="nx">d</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">add</span><span class="o">[</span><span class="nx">j</span><span class="o">]);</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">o</span> <span class="o">&amp;&amp;</span> <span class="k">this</span><span class="o">.</span><span class="nx">loadOptional</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">o</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">d</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">o</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
                <span class="nx">add</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getRequires</span><span class="o">(</span><span class="nx">info</span><span class="o">[</span><span class="nx">o</span><span class="o">[</span><span class="nx">i</span><span class="o">]]);</span>
                <span class="k">for</span> <span class="o">(</span><span class="nx">j</span><span class="o">=</span><span class="m">0</span><span class="o">;</span><span class="nx">j</span><span class="o">&lt;</span><span class="nx">add</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span><span class="nx">j</span><span class="o">=</span><span class="nx">j</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                    <span class="nx">d</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">add</span><span class="o">[</span><span class="nx">j</span><span class="o">]);</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="nx">mod</span><span class="o">.</span><span class="nx">expanded</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nb">Object</span><span class="o">.</span><span class="nx">keys</span><span class="o">(</span><span class="nx">Y</span><span class="o">.</span><span class="nb">Array</span><span class="o">.</span><span class="nx">hash</span><span class="o">(</span><span class="nx">d</span><span class="o">));</span>

        <span class="c">// Y.log(mod.expanded);</span>
<span class="c"></span>
        <span class="k">return</span> <span class="nx">mod</span><span class="o">.</span><span class="nx">expanded</span><span class="o">;</span>
    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">     * Returns an object literal of the modules the supplied module satisfies</span>
<span class="c">     * @method getProvides</span>
<span class="c">     * @param name{string} The name of the module</span>
<span class="c">     * @param notMe {string} don&#39;t add this module name, only include superseded modules</span>
<span class="c">     * @return what this module provides</span>
<span class="c">     */</span>
    <span class="nx">getProvides</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">name</span><span class="o">,</span> <span class="nx">notMe</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">var</span> <span class="nx">addMe</span> <span class="o">=</span> <span class="o">!(</span><span class="nx">notMe</span><span class="o">),</span> <span class="nx">ckey</span> <span class="o">=</span> <span class="o">(</span><span class="nx">addMe</span><span class="o">)</span> <span class="o">?</span> <span class="nx">PROV</span> <span class="o">:</span> <span class="nx">SUPER</span><span class="o">,</span>
            <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">name</span><span class="o">),</span> <span class="nx">o</span> <span class="o">=</span> <span class="o">{},</span>
            <span class="nx">s</span><span class="o">,</span> <span class="nx">done</span><span class="o">,</span> <span class="nx">me</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span>

            <span class="c">// use worker to break cycles</span>
<span class="c"></span>            <span class="nx">add</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">mm</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">if</span> <span class="o">(!</span><span class="nx">done</span><span class="o">[</span><span class="nx">mm</span><span class="o">])</span> <span class="o">{</span>
                    <span class="c">// Y.log(name + &#39; provides worker trying: &#39; + mm);</span>
<span class="c"></span>                    <span class="nx">done</span><span class="o">[</span><span class="nx">mm</span><span class="o">]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
                    <span class="c">// we always want the return value normal behavior </span>
<span class="c"></span>                    <span class="c">// (provides) for superseded modules.</span>
<span class="c"></span>                    <span class="nx">Y</span><span class="o">.</span><span class="nx">mix</span><span class="o">(</span><span class="nx">o</span><span class="o">,</span> <span class="nx">me</span><span class="o">.</span><span class="nx">getProvides</span><span class="o">(</span><span class="nx">mm</span><span class="o">));</span>
                <span class="o">}</span> 
                
                <span class="c">// else {</span>
<span class="c"></span>                <span class="c">// Y.log(name + &#39; provides worker skipping done: &#39; + mm);</span>
<span class="c"></span>                <span class="c">// }</span>
<span class="c"></span>            <span class="o">};</span>

        <span class="k">if</span> <span class="o">(!</span><span class="nx">m</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="nx">o</span><span class="o">;</span>
        <span class="o">}</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">m</span><span class="o">[</span><span class="nx">ckey</span><span class="o">])</span> <span class="o">{</span>
<span class="c">// Y.log(&#39;cached: &#39; + name + &#39; &#39; + ckey + &#39; &#39; + L.dump(this.moduleInfo[name][ckey], 0));</span>
<span class="c"></span>            <span class="k">return</span> <span class="nx">m</span><span class="o">[</span><span class="nx">ckey</span><span class="o">];</span>
        <span class="o">}</span>

        <span class="nx">s</span>    <span class="o">=</span> <span class="nx">m</span><span class="o">.</span><span class="nx">supersedes</span><span class="o">;</span>
        <span class="nx">done</span> <span class="o">=</span> <span class="o">{};</span>
        <span class="nx">me</span>   <span class="o">=</span> <span class="k">this</span><span class="o">;</span>


        <span class="c">// calculate superseded modules</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="nx">s</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">s</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">add</span><span class="o">(</span><span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="c">// supersedes cache</span>
<span class="c"></span>        <span class="nx">m</span><span class="o">[</span><span class="nx">SUPER</span><span class="o">]</span> <span class="o">=</span> <span class="nx">o</span><span class="o">;</span>
        <span class="c">// provides cache</span>
<span class="c"></span>        <span class="nx">m</span><span class="o">[</span><span class="nx">PROV</span><span class="o">]</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">merge</span><span class="o">(</span><span class="nx">o</span><span class="o">);</span>
        <span class="nx">m</span><span class="o">[</span><span class="nx">PROV</span><span class="o">][</span><span class="nx">name</span><span class="o">]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>

<span class="c">// Y.log(name + &quot; supersedes &quot; + L.dump(m[SUPER], 0));</span>
<span class="c">// Y.log(name + &quot; provides &quot; + L.dump(m[PROV], 0));</span>
<span class="c"></span>
        <span class="k">return</span> <span class="nx">m</span><span class="o">[</span><span class="nx">ckey</span><span class="o">];</span>
    <span class="o">},</span>


    <span class="c">/**</span>
<span class="c">     * Calculates the dependency tree, the result is stored in the sorted </span>
<span class="c">     * property</span>
<span class="c">     * @method calculate</span>
<span class="c">     * @param o optional options object</span>
<span class="c">     */</span>
    <span class="nx">calculate</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">o</span> <span class="o">||</span> <span class="k">this</span><span class="o">.</span><span class="nx">dirty</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_config</span><span class="o">(</span><span class="nx">o</span><span class="o">);</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_setup</span><span class="o">();</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_explode</span><span class="o">();</span>
            <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">allowRollup</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="k">this</span><span class="o">.</span><span class="nx">combine</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">_rollup</span><span class="o">();</span>
            <span class="o">}</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_reduce</span><span class="o">();</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_sort</span><span class="o">();</span>

            <span class="c">// Y.log(&quot;after calculate: &quot; + this.sorted);</span>
<span class="c"></span>
            <span class="k">this</span><span class="o">.</span><span class="nx">dirty</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
        <span class="o">}</span>
    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Investigates the current YUI configuration on the page.  By default,</span>
<span class="c">     * modules already detected will not be loaded again unless a force</span>
<span class="c">     * option is encountered.  Called by calculate()</span>
<span class="c">     * @method _setup</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_setup</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">info</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">moduleInfo</span><span class="o">,</span> <span class="nx">name</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">m</span><span class="o">,</span> <span class="nx">o</span><span class="o">,</span> <span class="nx">l</span><span class="o">,</span> <span class="nx">smod</span><span class="o">;</span>

        <span class="c">// Create skin modules</span>
<span class="c"></span>        <span class="k">for</span> <span class="o">(</span><span class="nx">name</span> <span class="k">in</span> <span class="nx">info</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">if</span> <span class="o">(</span><span class="nx">info</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">name</span><span class="o">))</span> <span class="o">{</span>
                <span class="nx">m</span> <span class="o">=</span> <span class="nx">info</span><span class="o">[</span><span class="nx">name</span><span class="o">];</span>
                <span class="k">if</span> <span class="o">(</span><span class="nx">m</span> <span class="o">&amp;&amp;</span> <span class="nx">m</span><span class="o">.</span><span class="nx">skinnable</span><span class="o">)</span> <span class="o">{</span>
                    <span class="c">// Y.log(&quot;skinning: &quot; + name);</span>
<span class="c"></span>                    <span class="nx">o</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">skin</span><span class="o">.</span><span class="nx">overrides</span><span class="o">;</span>
                    <span class="k">if</span> <span class="o">(</span><span class="nx">o</span> <span class="o">&amp;&amp;</span> <span class="nx">o</span><span class="o">[</span><span class="nx">name</span><span class="o">])</span> <span class="o">{</span>
                        <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">o</span><span class="o">[</span><span class="nx">name</span><span class="o">].</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                            <span class="nx">smod</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_addSkin</span><span class="o">(</span><span class="nx">o</span><span class="o">[</span><span class="nx">name</span><span class="o">][</span><span class="nx">i</span><span class="o">],</span> <span class="nx">name</span><span class="o">);</span>
                        <span class="o">}</span>
                    <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
                        <span class="nx">smod</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_addSkin</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">skin</span><span class="o">.</span><span class="nx">defaultSkin</span><span class="o">,</span> <span class="nx">name</span><span class="o">);</span>
                    <span class="o">}</span>

                    <span class="nx">m</span><span class="o">.</span><span class="nx">requires</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">smod</span><span class="o">);</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="nx">l</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">merge</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">inserted</span><span class="o">);</span> <span class="c">// shallow clone</span>
<span class="c"></span>
        <span class="c">// available modules</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">ignoreRegistered</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">Y</span><span class="o">.</span><span class="nx">mix</span><span class="o">(</span><span class="nx">l</span><span class="o">,</span> <span class="nx">GLOBAL_ENV</span><span class="o">.</span><span class="nx">mods</span><span class="o">);</span>
        <span class="o">}</span>
        
        <span class="c">// Y.log(&quot;Already loaded stuff: &quot; + L.dump(l, 0));</span>
<span class="c"></span>
        <span class="c">// add the ignore list to the list of loaded packages</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">ignore</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// OU.appendArray(l, this.ignore);</span>
<span class="c"></span>            <span class="nx">Y</span><span class="o">.</span><span class="nx">mix</span><span class="o">(</span><span class="nx">l</span><span class="o">,</span> <span class="nx">Y</span><span class="o">.</span><span class="nb">Array</span><span class="o">.</span><span class="nx">hash</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">ignore</span><span class="o">));</span>
        <span class="o">}</span>

        <span class="c">// expand the list to include superseded modules</span>
<span class="c"></span>        <span class="k">for</span> <span class="o">(</span><span class="nx">j</span> <span class="k">in</span> <span class="nx">l</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// Y.log(&quot;expanding: &quot; + j);</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(</span><span class="nx">l</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">j</span><span class="o">))</span> <span class="o">{</span>
                <span class="nx">Y</span><span class="o">.</span><span class="nx">mix</span><span class="o">(</span><span class="nx">l</span><span class="o">,</span> <span class="k">this</span><span class="o">.</span><span class="nx">getProvides</span><span class="o">(</span><span class="nx">j</span><span class="o">));</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="c">// remove modules on the force list from the loaded list</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">force</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="k">this</span><span class="o">.</span><span class="nx">force</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">force</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="k">in</span> <span class="nx">l</span><span class="o">)</span> <span class="o">{</span>
                    <span class="nx">delete</span> <span class="nx">l</span><span class="o">[</span><span class="k">this</span><span class="o">.</span><span class="nx">force</span><span class="o">[</span><span class="nx">i</span><span class="o">]];</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="c">// Y.log(&quot;loaded expanded: &quot; + L.dump(l, 0));</span>
<span class="c"></span>
        <span class="nx">Y</span><span class="o">.</span><span class="nx">mix</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">loaded</span><span class="o">,</span> <span class="nx">l</span><span class="o">);</span>

        <span class="c">// this.loaded = l;</span>
<span class="c"></span>
    <span class="o">},</span>
    

    <span class="c">/**</span>
<span class="c">     * Inspects the required modules list looking for additional </span>
<span class="c">     * dependencies.  Expands the required list to include all </span>
<span class="c">     * required modules.  Called by calculate()</span>
<span class="c">     * @method _explode</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_explode</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">r</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">required</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">mod</span><span class="o">,</span> <span class="nx">req</span><span class="o">,</span> <span class="nx">me</span> <span class="o">=</span> <span class="k">this</span><span class="o">,</span> <span class="nx">f</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">name</span><span class="o">)</span> <span class="o">{</span>

                <span class="nx">mod</span> <span class="o">=</span> <span class="nx">me</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">name</span><span class="o">);</span>

                <span class="k">var</span> <span class="nx">expound</span> <span class="o">=</span> <span class="nx">mod</span> <span class="o">&amp;&amp;</span> <span class="nx">mod</span><span class="o">.</span><span class="nx">expound</span><span class="o">;</span>
                <span class="c">// Y.log(&#39;exploding &#39; + i);</span>
<span class="c"></span>
                <span class="k">if</span> <span class="o">(</span><span class="nx">mod</span><span class="o">)</span> <span class="o">{</span>

                    <span class="k">if</span> <span class="o">(</span><span class="nx">expound</span><span class="o">)</span> <span class="o">{</span>
                        <span class="nx">r</span><span class="o">[</span><span class="nx">expound</span><span class="o">]</span> <span class="o">=</span> <span class="nx">me</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">expound</span><span class="o">);</span>
                        <span class="nx">req</span> <span class="o">=</span> <span class="nx">me</span><span class="o">.</span><span class="nx">getRequires</span><span class="o">(</span><span class="nx">r</span><span class="o">[</span><span class="nx">expound</span><span class="o">]);</span>
                        <span class="nx">Y</span><span class="o">.</span><span class="nx">mix</span><span class="o">(</span><span class="nx">r</span><span class="o">,</span> <span class="nx">Y</span><span class="o">.</span><span class="nb">Array</span><span class="o">.</span><span class="nx">hash</span><span class="o">(</span><span class="nx">req</span><span class="o">));</span>
                    <span class="o">}</span>

                    <span class="nx">req</span> <span class="o">=</span> <span class="nx">me</span><span class="o">.</span><span class="nx">getRequires</span><span class="o">(</span><span class="nx">mod</span><span class="o">);</span>

                    <span class="c">// Y.log(&#39;via explode: &#39; + req);</span>
<span class="c"></span>                    <span class="nx">Y</span><span class="o">.</span><span class="nx">mix</span><span class="o">(</span><span class="nx">r</span><span class="o">,</span> <span class="nx">Y</span><span class="o">.</span><span class="nb">Array</span><span class="o">.</span><span class="nx">hash</span><span class="o">(</span><span class="nx">req</span><span class="o">));</span>
                <span class="o">}</span>
            <span class="o">};</span>


        <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">r</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">if</span> <span class="o">(</span><span class="nx">r</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>
                <span class="nx">f</span><span class="o">(</span><span class="nx">i</span><span class="o">);</span>
            <span class="o">}</span>
        <span class="o">}</span>
    <span class="o">},</span>

    <span class="nx">getModule</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">name</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">moduleInfo</span><span class="o">[</span><span class="nx">name</span><span class="o">];</span>

        <span class="c">// create the default module</span>
<span class="c"></span>        <span class="c">// if (!m) {</span>
<span class="c"></span>            <span class="c">// Y.log(&#39;Module does not exist: &#39; + name + &#39;, creating with defaults&#39;);</span>
<span class="c"></span>            <span class="c">// m = this.addModule({ext: false}, name);</span>
<span class="c"></span>        <span class="c">// }</span>
<span class="c"></span>
        <span class="k">return</span> <span class="nx">m</span><span class="o">;</span>
    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Look for rollup packages to determine if all of the modules a</span>
<span class="c">     * rollup supersedes are required.  If so, include the rollup to</span>
<span class="c">     * help reduce the total number of connections required.  Called</span>
<span class="c">     * by calculate()</span>
<span class="c">     * @method _rollup</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_rollup</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">var</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">m</span><span class="o">,</span> <span class="nx">s</span><span class="o">,</span> <span class="nx">rollups</span><span class="o">={},</span> <span class="nx">r</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">required</span><span class="o">,</span> <span class="nx">roll</span><span class="o">,</span>
            <span class="nx">info</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">moduleInfo</span><span class="o">,</span> <span class="nx">rolled</span><span class="o">,</span> <span class="nx">c</span><span class="o">;</span>

        <span class="c">// find and cache rollup modules</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">dirty</span> <span class="o">||</span> <span class="o">!</span><span class="k">this</span><span class="o">.</span><span class="nx">rollups</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">info</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">if</span> <span class="o">(</span><span class="nx">info</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>
                    <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">i</span><span class="o">);</span>
                    <span class="c">// if (m &amp;&amp; m.rollup &amp;&amp; m.supersedes) {</span>
<span class="c"></span>                    <span class="k">if</span> <span class="o">(</span><span class="nx">m</span> <span class="o">&amp;&amp;</span> <span class="nx">m</span><span class="o">.</span><span class="nx">rollup</span><span class="o">)</span> <span class="o">{</span>
                        <span class="nx">rollups</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">=</span> <span class="nx">m</span><span class="o">;</span>
                    <span class="o">}</span>
                <span class="o">}</span>
            <span class="o">}</span>

            <span class="k">this</span><span class="o">.</span><span class="nx">rollups</span> <span class="o">=</span> <span class="nx">rollups</span><span class="o">;</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">forceMap</span> <span class="o">=</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">force</span><span class="o">)</span> <span class="o">?</span> <span class="nx">Y</span><span class="o">.</span><span class="nb">Array</span><span class="o">.</span><span class="nx">hash</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">force</span><span class="o">)</span> <span class="o">:</span> <span class="o">{};</span>
        <span class="o">}</span>

        <span class="c">// make as many passes as needed to pick up rollup rollups</span>
<span class="c"></span>        <span class="k">for</span> <span class="o">(;;)</span> <span class="o">{</span>
            <span class="nx">rolled</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>

            <span class="c">// go through the rollup candidates</span>
<span class="c"></span>            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">rollups</span><span class="o">)</span> <span class="o">{</span> 

                <span class="k">if</span> <span class="o">(</span><span class="nx">rollups</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>

                    <span class="c">// there can be only one, unless forced</span>
<span class="c"></span>                    <span class="k">if</span> <span class="o">(!</span><span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="o">((!</span><span class="k">this</span><span class="o">.</span><span class="nx">loaded</span><span class="o">[</span><span class="nx">i</span><span class="o">])</span> <span class="o">||</span> <span class="k">this</span><span class="o">.</span><span class="nx">forceMap</span><span class="o">[</span><span class="nx">i</span><span class="o">]))</span> <span class="o">{</span>
                        <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">i</span><span class="o">);</span> 
                        <span class="nx">s</span> <span class="o">=</span> <span class="nx">m</span><span class="o">.</span><span class="nx">supersedes</span> <span class="o">||</span> <span class="o">[];</span> 
                        <span class="nx">roll</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>

                        <span class="c">// @TODO remove continue</span>
<span class="c"></span>                        <span class="k">if</span> <span class="o">(!</span><span class="nx">m</span><span class="o">.</span><span class="nx">rollup</span><span class="o">)</span> <span class="o">{</span>
                            <span class="k">continue</span><span class="o">;</span>
                        <span class="o">}</span>

                        <span class="nx">c</span> <span class="o">=</span> <span class="m">0</span><span class="o">;</span>

                        <span class="c">// check the threshold</span>
<span class="c"></span>                        <span class="k">for</span> <span class="o">(</span><span class="nx">j</span><span class="o">=</span><span class="m">0</span><span class="o">;</span><span class="nx">j</span><span class="o">&lt;</span><span class="nx">s</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span><span class="nx">j</span><span class="o">=</span><span class="nx">j</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>


                            <span class="c">// if the superseded module is loaded, we can&#39;t load the rollup</span>
<span class="c"></span>                            <span class="c">// unless it has been forced</span>
<span class="c"></span>                            <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">loaded</span><span class="o">[</span><span class="nx">s</span><span class="o">[</span><span class="nx">j</span><span class="o">]]</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="k">this</span><span class="o">.</span><span class="nx">forceMap</span><span class="o">[</span><span class="nx">s</span><span class="o">[</span><span class="nx">j</span><span class="o">]])</span> <span class="o">{</span>
                                <span class="nx">roll</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
                                <span class="k">break</span><span class="o">;</span>
                            <span class="c">// increment the counter if this module is required.  if we are</span>
<span class="c"></span>                            <span class="c">// beyond the rollup threshold, we will use the rollup module</span>
<span class="c"></span>                            <span class="o">}</span> <span class="k">else</span> <span class="k">if</span> <span class="o">(</span><span class="nx">r</span><span class="o">[</span><span class="nx">s</span><span class="o">[</span><span class="nx">j</span><span class="o">]])</span> <span class="o">{</span>
                                <span class="nx">c</span><span class="o">++;</span>
                                <span class="c">// Y.log(&quot;adding to thresh: &quot; + c + &quot;, &quot; + s[j]);</span>
<span class="c"></span>                                <span class="nx">roll</span> <span class="o">=</span> <span class="o">(</span><span class="nx">c</span> <span class="o">&gt;=</span> <span class="nx">m</span><span class="o">.</span><span class="nx">rollup</span><span class="o">);</span>
                                <span class="k">if</span> <span class="o">(</span><span class="nx">roll</span><span class="o">)</span> <span class="o">{</span>
                                    <span class="c">// Y.log(&quot;over thresh &quot; + c + &quot;, &quot; + s[j]);</span>
<span class="c"></span>                                    <span class="k">break</span><span class="o">;</span>
                                <span class="o">}</span>
                            <span class="o">}</span>
                        <span class="o">}</span>

                        <span class="k">if</span> <span class="o">(</span><span class="nx">roll</span><span class="o">)</span> <span class="o">{</span>
                            <span class="c">// Y.log(&quot;adding rollup: &quot; +  i);</span>
<span class="c"></span>                            <span class="c">// add the rollup</span>
<span class="c"></span>                            <span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
                            <span class="nx">rolled</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>

                            <span class="c">// expand the rollup&#39;s dependencies</span>
<span class="c"></span>                            <span class="k">this</span><span class="o">.</span><span class="nx">getRequires</span><span class="o">(</span><span class="nx">m</span><span class="o">);</span>
                        <span class="o">}</span>
                    <span class="o">}</span>
                <span class="o">}</span>
            <span class="o">}</span>

            <span class="c">// if we made it here w/o rolling up something, we are done</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(!</span><span class="nx">rolled</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">break</span><span class="o">;</span>
            <span class="o">}</span>
        <span class="o">}</span>
    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Remove superceded modules and loaded modules.  Called by</span>
<span class="c">     * calculate() after we have the mega list of all dependencies</span>
<span class="c">     * @method _reduce</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_reduce</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">s</span><span class="o">,</span> <span class="nx">m</span><span class="o">,</span> <span class="nx">r</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">required</span><span class="o">;</span>
        <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">r</span><span class="o">)</span> <span class="o">{</span>

            <span class="k">if</span> <span class="o">(</span><span class="nx">r</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>

                <span class="c">// remove if already loaded</span>
<span class="c"></span>                <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">loaded</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">forceMap</span><span class="o">[</span><span class="nx">i</span><span class="o">])</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="k">this</span><span class="o">.</span><span class="nx">ignoreRegistered</span><span class="o">)</span> <span class="o">{</span> 
                    <span class="nx">delete</span> <span class="nx">r</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>

                <span class="c">// remove anything this module supersedes</span>
<span class="c"></span>                <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>

                     <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">i</span><span class="o">);</span>
                     <span class="nx">s</span> <span class="o">=</span> <span class="nx">m</span> <span class="o">&amp;&amp;</span> <span class="nx">m</span><span class="o">.</span><span class="nx">supersedes</span><span class="o">;</span>
                     <span class="k">if</span> <span class="o">(</span><span class="nx">s</span><span class="o">)</span> <span class="o">{</span>
                         <span class="k">for</span> <span class="o">(</span><span class="nx">j</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">j</span><span class="o">&lt;</span><span class="nx">s</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">j</span><span class="o">=</span><span class="nx">j</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                             <span class="k">if</span> <span class="o">(</span><span class="nx">s</span><span class="o">[</span><span class="nx">j</span><span class="o">]</span> <span class="k">in</span> <span class="nx">r</span><span class="o">)</span> <span class="o">{</span>
                                 <span class="nx">delete</span> <span class="nx">r</span><span class="o">[</span><span class="nx">s</span><span class="o">[</span><span class="nx">j</span><span class="o">]];</span>
                             <span class="o">}</span>
                         <span class="o">}</span>
                     <span class="o">}</span>
                <span class="o">}</span>
            <span class="o">}</span>
        <span class="o">}</span>
    <span class="o">},</span>

    <span class="nx">_attach</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>

        <span class="c">// this is the full list of items the YUI needs attached,</span>
<span class="c"></span>        <span class="c">// which is needed if some dependencies are already on</span>
<span class="c"></span>        <span class="c">// the page without their dependencies.</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">attaching</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;attaching Y supplied deps: &#39;</span> <span class="o">+</span> <span class="k">this</span><span class="o">.</span><span class="nx">attaching</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>
            <span class="nx">Y</span><span class="o">.</span><span class="nx">_attach</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">attaching</span><span class="o">);</span>
        <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
            <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;attaching sorted list: &#39;</span> <span class="o">+</span> <span class="k">this</span><span class="o">.</span><span class="nx">sorted</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>
            <span class="nx">Y</span><span class="o">.</span><span class="nx">_attach</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">sorted</span><span class="o">);</span>
        <span class="o">}</span>

        <span class="c">// this._pushEvents();</span>
<span class="c"></span>
    <span class="o">},</span>

    <span class="nx">_finish</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="nx">_queue</span><span class="o">.</span><span class="nx">running</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_continue</span><span class="o">();</span>
    <span class="o">},</span>

    <span class="nx">_onSuccess</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>

        <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;loader successful: &#39;</span> <span class="o">+</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">id</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">_attach</span><span class="o">();</span>

        <span class="k">var</span> <span class="nx">skipped</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">skipped</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">f</span><span class="o">;</span>

        <span class="k">for</span> <span class="o">(</span><span class="nx">i</span> <span class="k">in</span> <span class="nx">skipped</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">if</span> <span class="o">(</span><span class="nx">skipped</span><span class="o">.</span><span class="nx">hasOwnProperty</span><span class="o">(</span><span class="nx">i</span><span class="o">))</span> <span class="o">{</span>
                <span class="nx">delete</span> <span class="k">this</span><span class="o">.</span><span class="nx">inserted</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">skipped</span> <span class="o">=</span> <span class="o">{};</span>

        <span class="nx">f</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">onSuccess</span><span class="o">;</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">f</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">f</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">context</span><span class="o">,</span> <span class="o">{</span>
                <span class="nx">msg</span><span class="o">:</span> <span class="s1">&#39;success&#39;</span><span class="o">,</span>
                <span class="nx">data</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">data</span><span class="o">,</span>
                <span class="nx">success</span><span class="o">:</span> <span class="kc">true</span>
            <span class="o">});</span>
        <span class="o">}</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">_finish</span><span class="o">();</span>

    <span class="o">},</span>

    <span class="nx">_onFailure</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>

        <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;load error: &#39;</span> <span class="o">+</span> <span class="nx">o</span><span class="o">.</span><span class="nx">msg</span> <span class="o">+</span> <span class="s1">&#39;, &#39;</span> <span class="o">+</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">id</span><span class="o">,</span> <span class="s2">&quot;error&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">_attach</span><span class="o">();</span>

        <span class="k">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">onFailure</span><span class="o">;</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">f</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">f</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">context</span><span class="o">,</span> <span class="o">{</span>
                <span class="nx">msg</span><span class="o">:</span> <span class="s1">&#39;failure: &#39;</span> <span class="o">+</span> <span class="nx">o</span><span class="o">.</span><span class="nx">msg</span><span class="o">,</span>
                <span class="nx">data</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">data</span><span class="o">,</span>
                <span class="nx">success</span><span class="o">:</span> <span class="kc">false</span>
            <span class="o">});</span>
        <span class="o">}</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">_finish</span><span class="o">();</span>
    <span class="o">},</span>

    <span class="nx">_onTimeout</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>

        <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;loader timeout: &#39;</span> <span class="o">+</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">id</span><span class="o">,</span> <span class="s2">&quot;error&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">_attach</span><span class="o">();</span>

        <span class="k">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">onTimeout</span><span class="o">;</span>
        <span class="k">if</span> <span class="o">(</span><span class="nx">f</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">f</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">context</span><span class="o">,</span> <span class="o">{</span>
                <span class="nx">msg</span><span class="o">:</span> <span class="s1">&#39;timeout&#39;</span><span class="o">,</span>
                <span class="nx">data</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">data</span><span class="o">,</span>
                <span class="nx">success</span><span class="o">:</span> <span class="kc">false</span>
            <span class="o">});</span>
        <span class="o">}</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">_finish</span><span class="o">();</span>
    <span class="o">},</span>
    
    <span class="c">/**</span>
<span class="c">     * Sorts the dependency tree.  The last step of calculate()</span>
<span class="c">     * @method _sort</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_sort</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="c">// create an indexed list</span>
<span class="c"></span>        <span class="k">var</span> <span class="nx">s</span><span class="o">=</span><span class="nx">Y</span><span class="o">.</span><span class="nb">Object</span><span class="o">.</span><span class="nx">keys</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">required</span><span class="o">),</span> <span class="nx">info</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">moduleInfo</span><span class="o">,</span> <span class="nx">loaded</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">loaded</span><span class="o">,</span>
            <span class="nx">p</span><span class="o">,</span> <span class="nx">l</span><span class="o">,</span> <span class="nx">a</span><span class="o">,</span> <span class="nx">b</span><span class="o">,</span> <span class="nx">j</span><span class="o">,</span> <span class="nx">k</span><span class="o">,</span> <span class="nx">moved</span><span class="o">,</span>

        <span class="c">// returns true if b is not loaded, and is required</span>
<span class="c"></span>        <span class="c">// directly or by means of modules it supersedes.</span>
<span class="c"></span>            <span class="nx">requires</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">aa</span><span class="o">,</span> <span class="nx">bb</span><span class="o">)</span> <span class="o">{</span>

                <span class="k">var</span> <span class="nx">mm</span> <span class="o">=</span> <span class="nx">info</span><span class="o">[</span><span class="nx">aa</span><span class="o">],</span> <span class="nx">ii</span><span class="o">,</span> <span class="nx">rr</span><span class="o">,</span> <span class="nx">after</span><span class="o">,</span> <span class="nx">other</span><span class="o">,</span> <span class="nx">ss</span><span class="o">;</span>

                <span class="k">if</span> <span class="o">(</span><span class="nx">loaded</span><span class="o">[</span><span class="nx">bb</span><span class="o">]</span> <span class="o">||</span> <span class="o">!</span><span class="nx">mm</span><span class="o">)</span> <span class="o">{</span>
                    <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
                <span class="o">}</span>

                <span class="nx">rr</span>    <span class="o">=</span> <span class="nx">mm</span><span class="o">.</span><span class="nx">expanded</span><span class="o">;</span>
                <span class="nx">after</span> <span class="o">=</span> <span class="nx">mm</span><span class="o">.</span><span class="nx">after</span><span class="o">;</span> 
                <span class="nx">other</span> <span class="o">=</span> <span class="nx">info</span><span class="o">[</span><span class="nx">bb</span><span class="o">];</span>

                <span class="c">// check if this module requires the other directly</span>
<span class="c"></span>                <span class="k">if</span> <span class="o">(</span><span class="nx">rr</span> <span class="o">&amp;&amp;</span> <span class="nx">Y</span><span class="o">.</span><span class="nb">Array</span><span class="o">.</span><span class="nx">indexOf</span><span class="o">(</span><span class="nx">rr</span><span class="o">,</span> <span class="nx">bb</span><span class="o">)</span> <span class="o">&gt;</span> <span class="o">-</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                    <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
                <span class="o">}</span>

                <span class="c">// check if this module should be sorted after the other</span>
<span class="c"></span>                <span class="k">if</span> <span class="o">(</span><span class="nx">after</span> <span class="o">&amp;&amp;</span> <span class="nx">Y</span><span class="o">.</span><span class="nb">Array</span><span class="o">.</span><span class="nx">indexOf</span><span class="o">(</span><span class="nx">after</span><span class="o">,</span> <span class="nx">bb</span><span class="o">)</span> <span class="o">&gt;</span> <span class="o">-</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                    <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
                <span class="o">}</span>

                <span class="c">// check if this module requires one the other supersedes</span>
<span class="c"></span>                <span class="nx">ss</span> <span class="o">=</span> <span class="nx">info</span><span class="o">[</span><span class="nx">bb</span><span class="o">]</span> <span class="o">&amp;&amp;</span> <span class="nx">info</span><span class="o">[</span><span class="nx">bb</span><span class="o">].</span><span class="nx">supersedes</span><span class="o">;</span>
                <span class="k">if</span> <span class="o">(</span><span class="nx">ss</span><span class="o">)</span> <span class="o">{</span>
                    <span class="k">for</span> <span class="o">(</span><span class="nx">ii</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">ii</span><span class="o">&lt;</span><span class="nx">ss</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">ii</span><span class="o">=</span><span class="nx">ii</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                        <span class="k">if</span> <span class="o">(</span><span class="nx">requires</span><span class="o">(</span><span class="nx">aa</span><span class="o">,</span> <span class="nx">ss</span><span class="o">[</span><span class="nx">ii</span><span class="o">]))</span> <span class="o">{</span>
                            <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
                        <span class="o">}</span>
                    <span class="o">}</span>
                <span class="o">}</span>

                <span class="c">// external css files should be sorted below yui css</span>
<span class="c"></span>                <span class="k">if</span> <span class="o">(</span><span class="nx">mm</span><span class="o">.</span><span class="nx">ext</span> <span class="o">&amp;&amp;</span> <span class="nx">mm</span><span class="o">.</span><span class="nx">type</span> <span class="o">==</span> <span class="nx">CSS</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">other</span><span class="o">.</span><span class="nx">ext</span> <span class="o">&amp;&amp;</span> <span class="nx">other</span><span class="o">.</span><span class="nx">type</span> <span class="o">==</span> <span class="nx">CSS</span><span class="o">)</span> <span class="o">{</span>
                    <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
                <span class="o">}</span>

                <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
            <span class="o">};</span>

        <span class="c">// pointer to the first unsorted item</span>
<span class="c"></span>        <span class="nx">p</span> <span class="o">=</span> <span class="m">0</span><span class="o">;</span> 

        <span class="c">// keep going until we make a pass without moving anything</span>
<span class="c"></span>        <span class="k">for</span> <span class="o">(;;)</span> <span class="o">{</span>
           
            <span class="nx">l</span>     <span class="o">=</span> <span class="nx">s</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> 
            <span class="nx">moved</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>

            <span class="c">// start the loop after items that are already sorted</span>
<span class="c"></span>            <span class="k">for</span> <span class="o">(</span><span class="nx">j</span><span class="o">=</span><span class="nx">p</span><span class="o">;</span> <span class="nx">j</span><span class="o">&lt;</span><span class="nx">l</span><span class="o">;</span> <span class="nx">j</span><span class="o">=</span><span class="nx">j</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>

                <span class="c">// check the next module on the list to see if its</span>
<span class="c"></span>                <span class="c">// dependencies have been met</span>
<span class="c"></span>                <span class="nx">a</span> <span class="o">=</span> <span class="nx">s</span><span class="o">[</span><span class="nx">j</span><span class="o">];</span>

                <span class="c">// check everything below current item and move if we</span>
<span class="c"></span>                <span class="c">// find a requirement for the current item</span>
<span class="c"></span>                <span class="k">for</span> <span class="o">(</span><span class="nx">k</span><span class="o">=</span><span class="nx">j</span><span class="o">+</span><span class="m">1</span><span class="o">;</span> <span class="nx">k</span><span class="o">&lt;</span><span class="nx">l</span><span class="o">;</span> <span class="nx">k</span><span class="o">=</span><span class="nx">k</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                    <span class="k">if</span> <span class="o">(</span><span class="nx">requires</span><span class="o">(</span><span class="nx">a</span><span class="o">,</span> <span class="nx">s</span><span class="o">[</span><span class="nx">k</span><span class="o">]))</span> <span class="o">{</span>

                        <span class="c">// extract the dependency so we can move it up</span>
<span class="c"></span>                        <span class="nx">b</span> <span class="o">=</span> <span class="nx">s</span><span class="o">.</span><span class="nx">splice</span><span class="o">(</span><span class="nx">k</span><span class="o">,</span> <span class="m">1</span><span class="o">);</span>

                        <span class="c">// insert the dependency above the item that </span>
<span class="c"></span>                        <span class="c">// requires it</span>
<span class="c"></span>                        <span class="nx">s</span><span class="o">.</span><span class="nx">splice</span><span class="o">(</span><span class="nx">j</span><span class="o">,</span> <span class="m">0</span><span class="o">,</span> <span class="nx">b</span><span class="o">[</span><span class="m">0</span><span class="o">]);</span>

                        <span class="nx">moved</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
                        <span class="k">break</span><span class="o">;</span>
                    <span class="o">}</span>
                <span class="o">}</span>

                <span class="c">// jump out of loop if we moved something</span>
<span class="c"></span>                <span class="k">if</span> <span class="o">(</span><span class="nx">moved</span><span class="o">)</span> <span class="o">{</span>
                    <span class="k">break</span><span class="o">;</span>
                <span class="c">// this item is sorted, move our pointer and keep going</span>
<span class="c"></span>                <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
                    <span class="nx">p</span> <span class="o">=</span> <span class="nx">p</span> <span class="o">+</span> <span class="m">1</span><span class="o">;</span>
                <span class="o">}</span>
            <span class="o">}</span>

            <span class="c">// when we make it here and moved is false, we are </span>
<span class="c"></span>            <span class="c">// finished sorting</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(!</span><span class="nx">moved</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">break</span><span class="o">;</span>
            <span class="o">}</span>

        <span class="o">}</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">sorted</span> <span class="o">=</span> <span class="nx">s</span><span class="o">;</span>
    <span class="o">},</span>

    <span class="nx">_insert</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">source</span><span class="o">,</span> <span class="nx">o</span><span class="o">,</span> <span class="nx">type</span><span class="o">)</span> <span class="o">{</span>

        <span class="c">// Y.log(&#39;private _insert() &#39; + (type || &#39;&#39;) + &#39;, &#39; + Y.id, &quot;info&quot;, &quot;loader&quot;);</span>
<span class="c"></span>
        <span class="c">// restore the state at the time of the request</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="nx">source</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">_config</span><span class="o">(</span><span class="nx">source</span><span class="o">);</span>
        <span class="o">}</span>

        <span class="c">// build the dependency list</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">calculate</span><span class="o">(</span><span class="nx">o</span><span class="o">);</span>

        <span class="k">if</span> <span class="o">(!</span><span class="nx">type</span><span class="o">)</span> <span class="o">{</span>

            <span class="k">var</span> <span class="nx">self</span> <span class="o">=</span> <span class="k">this</span><span class="o">;</span>

            <span class="c">// Y.log(&quot;trying to load css first&quot;);</span>
<span class="c"></span>            <span class="k">this</span><span class="o">.</span><span class="nx">_internalCallback</span> <span class="o">=</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
                        <span class="k">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="nx">self</span><span class="o">.</span><span class="nx">onCSS</span><span class="o">;</span>
                        <span class="k">if</span> <span class="o">(</span><span class="nx">f</span><span class="o">)</span> <span class="o">{</span>
                            <span class="nx">f</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="nx">self</span><span class="o">.</span><span class="nx">context</span><span class="o">,</span> <span class="nx">Y</span><span class="o">);</span>
                        <span class="o">}</span>
                        <span class="nx">self</span><span class="o">.</span><span class="nx">_internalCallback</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
                        <span class="nx">self</span><span class="o">.</span><span class="nx">_insert</span><span class="o">(</span><span class="kc">null</span><span class="o">,</span> <span class="kc">null</span><span class="o">,</span> <span class="nx">JS</span><span class="o">);</span>
                    <span class="o">};</span>

            <span class="c">// _queue.running = false;</span>
<span class="c"></span>            <span class="k">this</span><span class="o">.</span><span class="nx">_insert</span><span class="o">(</span><span class="kc">null</span><span class="o">,</span> <span class="kc">null</span><span class="o">,</span> <span class="nx">CSS</span><span class="o">);</span>

            <span class="k">return</span><span class="o">;</span>
        <span class="o">}</span>


        <span class="c">// set a flag to indicate the load has started</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">_loading</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>

        <span class="c">// flag to indicate we are done with the combo service</span>
<span class="c"></span>        <span class="c">// and any additional files will need to be loaded</span>
<span class="c"></span>        <span class="c">// individually</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">_combineComplete</span> <span class="o">=</span> <span class="o">{};</span>

        <span class="c">// keep the loadType (js, css or undefined) cached</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">loadType</span> <span class="o">=</span> <span class="nx">type</span><span class="o">;</span>

        <span class="c">// start the load</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">loadNext</span><span class="o">();</span>

    <span class="o">},</span>

    <span class="nx">_continue</span><span class="o">:</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">if</span> <span class="o">(!(</span><span class="nx">_queue</span><span class="o">.</span><span class="nx">running</span><span class="o">)</span> <span class="o">&amp;&amp;</span> <span class="nx">_queue</span><span class="o">.</span><span class="nx">size</span><span class="o">()</span> <span class="o">&gt;</span> <span class="m">0</span><span class="o">)</span> <span class="o">{</span>
            <span class="nx">_queue</span><span class="o">.</span><span class="nx">running</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
            <span class="nx">_queue</span><span class="o">.</span><span class="nx">next</span><span class="o">()();</span>
        <span class="o">}</span>
    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * inserts the requested modules and their dependencies.  </span>
<span class="c">     * &lt;code&gt;type&lt;/code&gt; can be &quot;js&quot; or &quot;css&quot;.  Both script and </span>
<span class="c">     * css are inserted if type is not provided.</span>
<span class="c">     * @method insert</span>
<span class="c">     * @param o optional options object</span>
<span class="c">     * @param type {string} the type of dependency to insert</span>
<span class="c">     */</span>
    <span class="nx">insert</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">,</span> <span class="nx">type</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">self</span> <span class="o">=</span> <span class="k">this</span><span class="o">,</span> <span class="nx">copy</span><span class="o">;</span>

        <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;public insert() &#39;</span> <span class="o">+</span> <span class="nx">type</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>
        <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;public insert() &#39;</span> <span class="o">+</span> <span class="o">(</span><span class="nx">type</span> <span class="o">||</span> <span class="s1">&#39;&#39;</span><span class="o">)</span> <span class="o">+</span> <span class="s1">&#39;, &#39;</span> <span class="o">+</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">id</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>


        <span class="nx">copy</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">merge</span><span class="o">(</span><span class="k">this</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>
        <span class="nx">delete</span> <span class="nx">copy</span><span class="o">.</span><span class="nx">require</span><span class="o">;</span>
        <span class="nx">delete</span> <span class="nx">copy</span><span class="o">.</span><span class="nx">dirty</span><span class="o">;</span>

        <span class="nx">_queue</span><span class="o">.</span><span class="nx">add</span><span class="o">(</span><span class="k">function</span><span class="o">()</span> <span class="o">{</span>
            <span class="nx">self</span><span class="o">.</span><span class="nx">_insert</span><span class="o">(</span><span class="nx">copy</span><span class="o">,</span> <span class="nx">o</span><span class="o">,</span> <span class="nx">type</span><span class="o">);</span>
        <span class="o">});</span>

        <span class="k">this</span><span class="o">.</span><span class="nx">_continue</span><span class="o">();</span>

    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Executed every time a module is loaded, and if we are in a load</span>
<span class="c">     * cycle, we attempt to load the next script.  Public so that it</span>
<span class="c">     * is possible to call this if using a method other than</span>
<span class="c">     * Y.register to determine when scripts are fully loaded</span>
<span class="c">     * @method loadNext</span>
<span class="c">     * @param mname {string} optional the name of the module that has</span>
<span class="c">     * been loaded (which is usually why it is time to load the next</span>
<span class="c">     * one)</span>
<span class="c">     */</span>
    <span class="nx">loadNext</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">mname</span><span class="o">)</span> <span class="o">{</span>

        <span class="c">// It is possible that this function is executed due to something</span>
<span class="c"></span>        <span class="c">// else one the page loading a YUI module.  Only react when we</span>
<span class="c"></span>        <span class="c">// are actively loading something</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">_loading</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span><span class="o">;</span>
        <span class="o">}</span>

        <span class="k">var</span> <span class="nx">s</span><span class="o">,</span> <span class="nx">len</span><span class="o">,</span> <span class="nx">i</span><span class="o">,</span> <span class="nx">m</span><span class="o">,</span> <span class="nx">url</span><span class="o">,</span> <span class="nx">self</span><span class="o">=</span><span class="k">this</span><span class="o">,</span> <span class="nx">type</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">loadType</span><span class="o">,</span> <span class="nx">fn</span><span class="o">,</span> <span class="nx">msg</span><span class="o">,</span> <span class="nx">attr</span><span class="o">,</span>
            <span class="nx">callback</span><span class="o">=</span><span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;Combo complete: &#39;</span> <span class="o">+</span> <span class="nx">o</span><span class="o">.</span><span class="nx">data</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">_combineComplete</span><span class="o">[</span><span class="nx">type</span><span class="o">]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>


                <span class="k">var</span> <span class="nx">c</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">_combining</span><span class="o">,</span> <span class="nx">len</span><span class="o">=</span><span class="nx">c</span><span class="o">.</span><span class="nx">length</span><span class="o">,</span> <span class="nx">i</span><span class="o">;</span>

                <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">len</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                    <span class="k">this</span><span class="o">.</span><span class="nx">inserted</span><span class="o">[</span><span class="nx">c</span><span class="o">[</span><span class="nx">i</span><span class="o">]]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
                <span class="o">}</span>

                <span class="k">this</span><span class="o">.</span><span class="nx">loadNext</span><span class="o">(</span><span class="nx">o</span><span class="o">.</span><span class="nx">data</span><span class="o">);</span>
            <span class="o">},</span>
            <span class="nx">onsuccess</span><span class="o">=</span><span class="k">function</span><span class="o">(</span><span class="nx">o</span><span class="o">)</span> <span class="o">{</span>
                <span class="c">// Y.log(&#39;loading next, just loaded&#39; + o.data);</span>
<span class="c"></span>                <span class="nx">self</span><span class="o">.</span><span class="nx">loadNext</span><span class="o">(</span><span class="nx">o</span><span class="o">.</span><span class="nx">data</span><span class="o">);</span>
            <span class="o">};</span>

        <span class="c">// @TODO this will need to handle the two phase insert when</span>
<span class="c"></span>        <span class="c">// CSS support is added</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">combine</span> <span class="o">&amp;&amp;</span> <span class="o">(!</span><span class="k">this</span><span class="o">.</span><span class="nx">_combineComplete</span><span class="o">[</span><span class="nx">type</span><span class="o">]))</span> <span class="o">{</span>

            <span class="k">this</span><span class="o">.</span><span class="nx">_combining</span> <span class="o">=</span> <span class="o">[];</span> 
            <span class="nx">s</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">sorted</span><span class="o">;</span>
            <span class="nx">len</span><span class="o">=</span><span class="nx">s</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span>
            <span class="nx">url</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">comboBase</span><span class="o">;</span>

            <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">len</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
                <span class="c">// Do not try to combine non-yui JS</span>
<span class="c"></span>                <span class="k">if</span> <span class="o">(</span><span class="nx">m</span> <span class="o">&amp;&amp;</span> <span class="nx">m</span><span class="o">.</span><span class="nx">type</span> <span class="o">===</span> <span class="k">this</span><span class="o">.</span><span class="nx">loadType</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nx">m</span><span class="o">.</span><span class="nx">ext</span><span class="o">)</span> <span class="o">{</span>
                    <span class="nx">url</span> <span class="o">+=</span> <span class="k">this</span><span class="o">.</span><span class="nx">root</span> <span class="o">+</span> <span class="nx">m</span><span class="o">.</span><span class="nx">path</span><span class="o">;</span>
                    <span class="k">if</span> <span class="o">(</span><span class="nx">i</span> <span class="o">&lt;</span> <span class="nx">len</span><span class="o">-</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                        <span class="nx">url</span> <span class="o">+=</span> <span class="s1">&#39;&amp;&#39;</span><span class="o">;</span>
                    <span class="o">}</span>

                    <span class="k">this</span><span class="o">.</span><span class="nx">_combining</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>
                <span class="o">}</span>
            <span class="o">}</span>

            <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_combining</span><span class="o">.</span><span class="nx">length</span><span class="o">)</span> <span class="o">{</span>

<span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s1">&#39;Attempting to use combo: &#39;</span> <span class="o">+</span> <span class="k">this</span><span class="o">.</span><span class="nx">_combining</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>

                <span class="c">// if (m.type === CSS) {</span>
<span class="c"></span>                <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">loadType</span> <span class="o">===</span> <span class="nx">CSS</span><span class="o">)</span> <span class="o">{</span>
                    <span class="nx">fn</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Get</span><span class="o">.</span><span class="nx">css</span><span class="o">;</span>
                    <span class="nx">attr</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cssAttributes</span><span class="o">;</span>
                <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
                    <span class="nx">fn</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Get</span><span class="o">.</span><span class="nx">script</span><span class="o">;</span>
                    <span class="nx">attr</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">jsAttributes</span><span class="o">;</span>
                <span class="o">}</span>

                <span class="c">// @TODO get rid of the redundant Get code</span>
<span class="c"></span>                <span class="nx">fn</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_filter</span><span class="o">(</span><span class="nx">url</span><span class="o">),</span> <span class="o">{</span>
                    <span class="nx">data</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">_loading</span><span class="o">,</span>
                    <span class="nx">onSuccess</span><span class="o">:</span> <span class="nx">callback</span><span class="o">,</span>
                    <span class="nx">onFailure</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">_onFailure</span><span class="o">,</span>
                    <span class="nx">onTimeout</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">_onTimeout</span><span class="o">,</span>
                    <span class="nx">insertBefore</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">insertBefore</span><span class="o">,</span>
                    <span class="nx">charset</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">charset</span><span class="o">,</span>
                    <span class="nx">attributes</span><span class="o">:</span> <span class="nx">attr</span><span class="o">,</span>
                    <span class="nx">timeout</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">timeout</span><span class="o">,</span>
                    <span class="nx">autopurge</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span>
                    <span class="nx">context</span><span class="o">:</span> <span class="nx">self</span> 
                <span class="o">});</span>

                <span class="k">return</span><span class="o">;</span>

            <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">_combineComplete</span><span class="o">[</span><span class="nx">type</span><span class="o">]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">mname</span><span class="o">)</span> <span class="o">{</span>

            <span class="c">// if the module that was just loaded isn&#39;t what we were expecting,</span>
<span class="c"></span>            <span class="c">// continue to wait</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(</span><span class="nx">mname</span> <span class="o">!==</span> <span class="k">this</span><span class="o">.</span><span class="nx">_loading</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">return</span><span class="o">;</span>
            <span class="o">}</span>

<span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;loadNext executing, just loaded &quot;</span> <span class="o">+</span> <span class="nx">mname</span> <span class="o">+</span> <span class="s2">&quot;, &quot;</span> <span class="o">+</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">id</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>

            <span class="c">// The global handler that is called when each module is loaded</span>
<span class="c"></span>            <span class="c">// will pass that module name to this function.  Storing this</span>
<span class="c"></span>            <span class="c">// data to avoid loading the same module multiple times</span>
<span class="c"></span>            <span class="k">this</span><span class="o">.</span><span class="nx">inserted</span><span class="o">[</span><span class="nx">mname</span><span class="o">]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">loaded</span><span class="o">[</span><span class="nx">mname</span><span class="o">]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>

            <span class="k">if</span> <span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">onProgress</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">onProgress</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">context</span><span class="o">,</span> <span class="o">{</span>
                        <span class="nx">name</span><span class="o">:</span> <span class="nx">mname</span><span class="o">,</span>
                        <span class="nx">data</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">data</span>
                    <span class="o">});</span>
            <span class="o">}</span>


        <span class="o">}</span>

        <span class="nx">s</span><span class="o">=</span><span class="k">this</span><span class="o">.</span><span class="nx">sorted</span><span class="o">;</span>
        <span class="nx">len</span><span class="o">=</span><span class="nx">s</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span>

        <span class="k">for</span> <span class="o">(</span><span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span><span class="o">&lt;</span><span class="nx">len</span><span class="o">;</span> <span class="nx">i</span><span class="o">=</span><span class="nx">i</span><span class="o">+</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>

            <span class="c">// this.inserted keeps track of what the loader has loaded.</span>
<span class="c"></span>            <span class="c">// move on if this item is done.</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(</span><span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="k">in</span> <span class="k">this</span><span class="o">.</span><span class="nx">inserted</span><span class="o">)</span> <span class="o">{</span>
                <span class="c">// Y.log(s[i] + &quot; alread loaded &quot;);</span>
<span class="c"></span>                <span class="k">continue</span><span class="o">;</span>
            <span class="o">}</span>

            <span class="c">// Because rollups will cause multiple load notifications</span>
<span class="c"></span>            <span class="c">// from Y, loadNext may be called multiple times for</span>
<span class="c"></span>            <span class="c">// the same module when loading a rollup.  We can safely</span>
<span class="c"></span>            <span class="c">// skip the subsequent requests</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(</span><span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">===</span> <span class="k">this</span><span class="o">.</span><span class="nx">_loading</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;still loading &quot;</span> <span class="o">+</span> <span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">+</span> <span class="s2">&quot;, waiting&quot;</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>
                <span class="k">return</span><span class="o">;</span>
            <span class="o">}</span>

            <span class="c">// log(&quot;inserting &quot; + s[i]);</span>
<span class="c"></span>            <span class="nx">m</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">getModule</span><span class="o">(</span><span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>

            <span class="k">if</span> <span class="o">(!</span><span class="nx">m</span><span class="o">)</span> <span class="o">{</span>

                <span class="nx">msg</span> <span class="o">=</span> <span class="s2">&quot;Undefined module &quot;</span> <span class="o">+</span> <span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">+</span> <span class="s2">&quot; skipped&quot;</span><span class="o">;</span>
                <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="nx">msg</span><span class="o">,</span> <span class="s1">&#39;warn&#39;</span><span class="o">,</span> <span class="s1">&#39;loader&#39;</span><span class="o">);</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">inserted</span><span class="o">[</span><span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">skipped</span><span class="o">[</span><span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]]</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
                <span class="k">continue</span><span class="o">;</span>

            <span class="o">}</span>


            <span class="c">// The load type is stored to offer the possibility to load</span>
<span class="c"></span>            <span class="c">// the css separately from the script.</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(!</span><span class="nx">type</span> <span class="o">||</span> <span class="nx">type</span> <span class="o">===</span> <span class="nx">m</span><span class="o">.</span><span class="nx">type</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">_loading</span> <span class="o">=</span> <span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">];</span>
                <span class="nx">Y</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;attempting to load &quot;</span> <span class="o">+</span> <span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]</span> <span class="o">+</span> <span class="s2">&quot;, &quot;</span> <span class="o">+</span> <span class="k">this</span><span class="o">.</span><span class="nx">base</span><span class="o">,</span> <span class="s2">&quot;info&quot;</span><span class="o">,</span> <span class="s2">&quot;loader&quot;</span><span class="o">);</span>

                <span class="k">if</span> <span class="o">(</span><span class="nx">m</span><span class="o">.</span><span class="nx">type</span> <span class="o">===</span> <span class="nx">CSS</span><span class="o">)</span> <span class="o">{</span>
                    <span class="nx">fn</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Get</span><span class="o">.</span><span class="nx">css</span><span class="o">;</span>
                    <span class="nx">attr</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">cssAttributes</span><span class="o">;</span>
                <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
                    <span class="nx">fn</span> <span class="o">=</span> <span class="nx">Y</span><span class="o">.</span><span class="nx">Get</span><span class="o">.</span><span class="nx">script</span><span class="o">;</span>
                    <span class="nx">attr</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">jsAttributes</span><span class="o">;</span>
                <span class="o">}</span>

                <span class="nx">url</span> <span class="o">=</span> <span class="o">(</span><span class="nx">m</span><span class="o">.</span><span class="nx">fullpath</span><span class="o">)</span> <span class="o">?</span> <span class="k">this</span><span class="o">.</span><span class="nx">_filter</span><span class="o">(</span><span class="nx">m</span><span class="o">.</span><span class="nx">fullpath</span><span class="o">,</span> <span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">])</span> <span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">_url</span><span class="o">(</span><span class="nx">m</span><span class="o">.</span><span class="nx">path</span><span class="o">,</span> <span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">]);</span>

                <span class="nx">fn</span><span class="o">(</span><span class="nx">url</span><span class="o">,</span> <span class="o">{</span>
                    <span class="nx">data</span><span class="o">:</span> <span class="nx">s</span><span class="o">[</span><span class="nx">i</span><span class="o">],</span>
                    <span class="nx">onSuccess</span><span class="o">:</span> <span class="nx">onsuccess</span><span class="o">,</span>
                    <span class="nx">insertBefore</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">insertBefore</span><span class="o">,</span>
                    <span class="nx">charset</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">charset</span><span class="o">,</span>
                    <span class="nx">attributes</span><span class="o">:</span> <span class="nx">attr</span><span class="o">,</span>
                    <span class="nx">onFailure</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">_onFailure</span><span class="o">,</span>
                    <span class="nx">onTimeout</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">_onTimeout</span><span class="o">,</span>
                    <span class="nx">timeout</span><span class="o">:</span> <span class="k">this</span><span class="o">.</span><span class="nx">timeout</span><span class="o">,</span>
                    <span class="nx">autopurge</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span>
                    <span class="nx">context</span><span class="o">:</span> <span class="nx">self</span> 
                <span class="o">});</span>

                <span class="k">return</span><span class="o">;</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="c">// we are finished</span>
<span class="c"></span>        <span class="k">this</span><span class="o">.</span><span class="nx">_loading</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>

        <span class="nx">fn</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_internalCallback</span><span class="o">;</span>

        <span class="c">// internal callback for loading css first</span>
<span class="c"></span>        <span class="k">if</span> <span class="o">(</span><span class="nx">fn</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// Y.log(&#39;loader internal&#39;);</span>
<span class="c"></span>            <span class="k">this</span><span class="o">.</span><span class="nx">_internalCallback</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
            <span class="nx">fn</span><span class="o">.</span><span class="nx">call</span><span class="o">(</span><span class="k">this</span><span class="o">);</span>

        <span class="c">// } else if (this.onSuccess) {</span>
<span class="c"></span>        <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
            <span class="c">// Y.log(&#39;loader complete&#39;);</span>
<span class="c"></span>            <span class="c">// call Y.use passing this instance. Y will use the sorted</span>
<span class="c"></span>            <span class="c">// dependency list.</span>
<span class="c"></span>            <span class="k">this</span><span class="o">.</span><span class="nx">_onSuccess</span><span class="o">();</span>
        <span class="o">}</span>

    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Apply filter defined for this instance to a url/path</span>
<span class="c">     * method _filter</span>
<span class="c">     * @param u {string} the string to filter</span>
<span class="c">     * @param name {string} the name of the module, if we are processing</span>
<span class="c">     * a single module as opposed to a combined url</span>
<span class="c">     * @return {string} the filtered string</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_filter</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">u</span><span class="o">,</span> <span class="nx">name</span><span class="o">)</span> <span class="o">{</span>

        <span class="k">var</span> <span class="nx">f</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">filter</span><span class="o">,</span> 
            <span class="nx">hasFilter</span> <span class="o">=</span> <span class="nx">name</span> <span class="o">&amp;&amp;</span> <span class="o">(</span><span class="nx">name</span> <span class="k">in</span> <span class="k">this</span><span class="o">.</span><span class="nx">filters</span><span class="o">),</span>
            <span class="nx">modFilter</span> <span class="o">=</span> <span class="nx">hasFilter</span> <span class="o">&amp;&amp;</span> <span class="k">this</span><span class="o">.</span><span class="nx">filters</span><span class="o">[</span><span class="nx">name</span><span class="o">];</span>

        <span class="k">if</span> <span class="o">(</span><span class="nx">u</span><span class="o">)</span> <span class="o">{</span>

            <span class="k">if</span> <span class="o">(</span><span class="nx">hasFilter</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">f</span> <span class="o">=</span> <span class="o">(</span><span class="nx">L</span><span class="o">.</span><span class="nx">isString</span><span class="o">(</span><span class="nx">modFilter</span><span class="o">))</span> <span class="o">?</span> <span class="k">this</span><span class="o">.</span><span class="nx">FILTER_DEFS</span><span class="o">[</span><span class="nx">modFilter</span><span class="o">.</span><span class="nx">toUpperCase</span><span class="o">()]</span> <span class="o">||</span> <span class="kc">null</span> <span class="o">:</span> <span class="nx">modFilter</span><span class="o">;</span>
            <span class="o">}</span>

            <span class="k">if</span> <span class="o">(</span><span class="nx">f</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">u</span> <span class="o">=</span> <span class="nx">u</span><span class="o">.</span><span class="nx">replace</span><span class="o">(</span><span class="k">new</span> <span class="nb">RegExp</span><span class="o">(</span><span class="nx">f</span><span class="o">.</span><span class="nx">searchExp</span><span class="o">,</span> <span class="s1">&#39;g&#39;</span><span class="o">),</span> <span class="nx">f</span><span class="o">.</span><span class="nx">replaceStr</span><span class="o">);</span>
            <span class="o">}</span>
        <span class="o">}</span>

        <span class="k">return</span> <span class="nx">u</span><span class="o">;</span>

    <span class="o">},</span>

    <span class="c">/**</span>
<span class="c">     * Generates the full url for a module</span>
<span class="c">     * method _url</span>
<span class="c">     * @param path {string} the path fragment</span>
<span class="c">     * @return {string} the full url</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">_url</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">path</span><span class="o">,</span> <span class="nx">name</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">return</span> <span class="k">this</span><span class="o">.</span><span class="nx">_filter</span><span class="o">((</span><span class="k">this</span><span class="o">.</span><span class="nx">base</span> <span class="o">||</span> <span class="s2">&quot;&quot;</span><span class="o">)</span> <span class="o">+</span> <span class="nx">path</span><span class="o">,</span> <span class="nx">name</span><span class="o">);</span>
    <span class="o">}</span>

<span class="o">};</span>

<span class="o">})();</span>
</pre></div>
                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_anim.html" title="anim">anim</a></li>
                                <li class=""><a href="module_attribute.html" title="attribute">attribute</a></li>
                                <li class=""><a href="module_base.html" title="base">base</a></li>
                                <li class=""><a href="module_cache.html" title="cache">cache</a></li>
                                <li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
                                <li class=""><a href="module_collection.html" title="collection">collection</a></li>
                                <li class=""><a href="module_console.html" title="console">console</a></li>
                                <li class=""><a href="module_console-filters.html" title="console-filters">console-filters</a></li>
                                <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
                                <li class=""><a href="module_dataschema.html" title="dataschema">dataschema</a></li>
                                <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
                                <li class=""><a href="module_datatype.html" title="datatype">datatype</a></li>
                                <li class=""><a href="module_dd.html" title="dd">dd</a></li>
                                <li class=""><a href="module_dom.html" title="dom">dom</a></li>
                                <li class=""><a href="module_dump.html" title="dump">dump</a></li>
                                <li class=""><a href="module_event.html" title="event">event</a></li>
                                <li class=""><a href="module_event-custom.html" title="event-custom">event-custom</a></li>
                                <li class=""><a href="module_event-simulate.html" title="event-simulate">event-simulate</a></li>
                                <li class=""><a href="module_history.html" title="history">history</a></li>
                                <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
                                <li class=""><a href="module_io.html" title="io">io</a></li>
                                <li class=""><a href="module_json.html" title="json">json</a></li>
                                <li class=""><a href="module_node.html" title="node">node</a></li>
                                <li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
                                <li class=""><a href="module_node-menunav.html" title="node-menunav">node-menunav</a></li>
                                <li class=""><a href="module_oop.html" title="oop">oop</a></li>
                                <li class=""><a href="module_overlay.html" title="overlay">overlay</a></li>
                                <li class=""><a href="module_plugin.html" title="plugin">plugin</a></li>
                                <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
                                <li class=""><a href="module_queue.html" title="queue">queue</a></li>
                                <li class=""><a href="module_slider.html" title="slider">slider</a></li>
                                <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
                                <li class=""><a href="module_substitute.html" title="substitute">substitute</a></li>
                                <li class=""><a href="module_test.html" title="test">test</a></li>
                                <li class=""><a href="module_widget.html" title="widget">widget</a></li>
                                <li class=""><a href="module_widget-position.html" title="widget-position">widget-position</a></li>
                                <li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li>
                                <li class=""><a href="module_widget-stack.html" title="widget-stack">widget-stack</a></li>
                                <li class=""><a href="module_widget-stdmod.html" title="widget-stdmod">widget-stdmod</a></li>
                                <li class="selected"><a href="module_yui.html" title="yui">yui</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="Array.html" title="Array">Array</a></li>
                                <li class=""><a href="config.html" title="config">config</a></li>
                                <li class=""><a href="Get.html" title="Get">Get</a></li>
                                <li class=""><a href="Lang.html" title="Lang">Lang</a></li>
                                <li class=""><a href="Loader.html" title="Loader">Loader</a></li>
                                <li class=""><a href="Object.html" title="Object">Object</a></li>
                                <li class=""><a href="UA.html" title="UA">UA</a></li>
                                <li class=""><a href="YUI.html" title="YUI">YUI</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class=""><a href="_module.js.html" title="_module.js">_module.js</a></li>
                                <li class=""><a href="get.js.html" title="get.js">get.js</a></li>
                                <li class="selected"><a href="loader.js.html" title="loader.js">loader.js</a></li>
                                <li class=""><a href="yui-array.js.html" title="yui-array.js">yui-array.js</a></li>
                                <li class=""><a href="yui-base.js.html" title="yui-base.js">yui-base.js</a></li>
                                <li class=""><a href="yui-core.js.html" title="yui-core.js">yui-core.js</a></li>
                                <li class=""><a href="yui-init.js.html" title="yui-init.js">yui-init.js</a></li>
                                <li class=""><a href="yui-lang.js.html" title="yui-lang.js">yui-lang.js</a></li>
                                <li class=""><a href="yui-later.js.html" title="yui-later.js">yui-later.js</a></li>
                                <li class=""><a href="yui-log.js.html" title="yui-log.js">yui-log.js</a></li>
                                <li class=""><a href="yui-object.js.html" title="yui-object.js">yui-object.js</a></li>
                                <li class=""><a href="yui-ua.js.html" title="yui-ua.js">yui-ua.js</a></li>
                                <li class=""><a href="yui.js.html" title="yui.js">yui.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2009 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">
    ALL_YUI_PROPS = [{"access": "", "host": "Object", "name": "()", "url": "Object.html#method_()", "type": "method"}, {"access": "", "host": "Array", "name": "()", "url": "Array.html#method_()", "type": "method"}, {"access": "", "host": "Get", "name": "abort", "url": "Get.html#method_abort", "type": "method"}, {"access": "", "host": "YUI", "name": "add", "url": "YUI.html#method_add", "type": "method"}, {"access": "", "host": "Loader", "name": "addModule", "url": "Loader.html#method_addModule", "type": "method"}, {"access": "private", "host": "Loader", "name": "_addSkin", "url": "Loader.html#method__addSkin", "type": "method"}, {"access": "", "host": "UA", "name": "air", "url": "UA.html#property_air", "type": "property"}, {"access": "", "host": "Loader", "name": "allowRollup", "url": "Loader.html#property_allowRollup", "type": "property"}, {"access": "", "host": "YUI", "name": "applyTo", "url": "YUI.html#method_applyTo", "type": "method"}, {"access": "", "host": "Loader", "name": "attaching", "url": "Loader.html#property_attaching", "type": "property"}, {"access": "private", "host": "Get", "name": "_autoPurge", "url": "Get.html#method__autoPurge", "type": "method"}, {"access": "", "host": "YUI", "name": "available", "url": "YUI.html#event_available", "type": "event"}, {"access": "", "host": "config", "name": "base", "url": "config.html#property_base", "type": "property"}, {"access": "", "host": "Loader", "name": "base", "url": "Loader.html#property_base", "type": "property"}, {"access": "", "host": "YUI", "name": "blur", "url": "YUI.html#event_blur", "type": "event"}, {"access": "", "host": "YUI", "name": "cached", "url": "YUI.html#method_cached", "type": "method"}, {"access": "", "host": "UA", "name": "caja", "url": "UA.html#property_caja", "type": "property"}, {"access": "", "host": "Loader", "name": "calculate", "url": "Loader.html#method_calculate", "type": "method"}, {"access": "", "host": "config", "name": "charset", "url": "config.html#property_charset", "type": "property"}, {"access": "", "host": "Loader", "name": "charset", "url": "Loader.html#property_charset", "type": "property"}, {"access": "", "host": "config", "name": "combine", "url": "config.html#property_combine", "type": "property"}, {"access": "", "host": "Loader", "name": "combine", "url": "Loader.html#property_combine", "type": "property"}, {"access": "", "host": "config", "name": "comboBase", "url": "config.html#property_comboBase", "type": "property"}, {"access": "", "host": "Loader", "name": "comboBase", "url": "Loader.html#property_comboBase", "type": "property"}, {"access": "", "host": "YUI", "name": "contentready", "url": "YUI.html#event_contentready", "type": "event"}, {"access": "", "host": "Loader", "name": "context", "url": "Loader.html#property_context", "type": "property"}, {"access": "", "host": "config", "name": "core", "url": "config.html#property_core", "type": "property"}, {"access": "", "host": "Get", "name": "css", "url": "Get.html#method_css", "type": "method"}, {"access": "", "host": "config", "name": "cssAttributes", "url": "config.html#property_cssAttributes", "type": "property"}, {"access": "", "host": "Loader", "name": "cssAttributes", "url": "Loader.html#property_cssAttributes", "type": "property"}, {"access": "", "host": "Loader", "name": "data", "url": "Loader.html#property_data", "type": "property"}, {"access": "", "host": "config", "name": "dateFormat", "url": "config.html#property_dateFormat", "type": "property"}, {"access": "", "host": "config", "name": "debug", "url": "config.html#property_debug", "type": "property"}, {"access": "", "host": "YUI", "name": "delegate", "url": "YUI.html#event_delegate", "type": "event"}, {"access": "", "host": "Loader", "name": "dirty", "url": "Loader.html#property_dirty", "type": "property"}, {"access": "", "host": "config", "name": "doc", "url": "config.html#property_doc", "type": "property"}, {"access": "", "host": "YUI", "name": "domready", "url": "YUI.html#event_domready", "type": "event"}, {"access": "", "host": "Object", "name": "each", "url": "Object.html#method_each", "type": "method"}, {"access": "", "host": "Array", "name": "each", "url": "Array.html#method_each", "type": "method"}, {"access": "private", "host": "Get", "name": "_end", "url": "Get.html#method__end", "type": "method"}, {"access": "", "host": "YUI", "name": "error", "url": "YUI.html#method_error", "type": "method"}, {"access": "", "host": "YUI", "name": "event:ready", "url": "YUI.html#event_event:ready", "type": "event"}, {"access": "private", "host": "Loader", "name": "_explode", "url": "Loader.html#method__explode", "type": "method"}, {"access": "private", "host": "Object", "name": "_extract", "url": "Object.html#method__extract", "type": "method"}, {"access": "", "host": "config", "name": "filter", "url": "config.html#property_filter", "type": "property"}, {"access": "", "host": "Loader", "name": "filter", "url": "Loader.html#property_filter", "type": "property"}, {"access": "private", "host": "Loader", "name": "_filter", "url": "Loader.html#method__filter", "type": "method"}, {"access": "", "host": "config", "name": "filters", "url": "config.html#property_filters", "type": "property"}, {"access": "", "host": "Loader", "name": "filters", "url": "Loader.html#property_filters", "type": "property"}, {"access": "private", "host": "Get", "name": "_finalize", "url": "Get.html#method__finalize", "type": "method"}, {"access": "private", "host": "Get", "name": "_finish", "url": "Get.html#method__finish", "type": "method"}, {"access": "", "host": "YUI", "name": "focus", "url": "YUI.html#event_focus", "type": "event"}, {"access": "", "host": "config", "name": "force", "url": "config.html#property_force", "type": "property"}, {"access": "", "host": "Loader", "name": "force", "url": "Loader.html#property_force", "type": "property"}, {"access": "", "host": "Loader", "name": "formatSkin", "url": "Loader.html#method_formatSkin", "type": "method"}, {"access": "", "host": "UA", "name": "gecko", "url": "UA.html#property_gecko", "type": "property"}, {"access": "", "host": "Loader", "name": "getProvides", "url": "Loader.html#method_getProvides", "type": "method"}, {"access": "", "host": "Loader", "name": "getRequires", "url": "Loader.html#method_getRequires", "type": "method"}, {"access": "", "host": "Object", "name": "getValue", "url": "Object.html#method_getValue", "type": "method"}, {"access": "", "host": "YUI", "name": "Global", "url": "YUI.html#property_Global", "type": "property"}, {"access": "", "host": "YUI", "name": "guid", "url": "YUI.html#method_guid", "type": "method"}, {"access": "", "host": "Array", "name": "hash", "url": "Array.html#method_hash", "type": "method"}, {"access": "", "host": "Object", "name": "hasKey", "url": "Object.html#method_hasKey", "type": "method"}, {"access": "", "host": "Object", "name": "hasValue", "url": "Object.html#method_hasValue", "type": "method"}, {"access": "", "host": "UA", "name": "ie", "url": "UA.html#property_ie", "type": "property"}, {"access": "", "host": "config", "name": "ignore", "url": "config.html#property_ignore", "type": "property"}, {"access": "", "host": "Loader", "name": "ignore", "url": "Loader.html#property_ignore", "type": "property"}, {"access": "", "host": "Loader", "name": "ignoreRegistered", "url": "Loader.html#property_ignoreRegistered", "type": "property"}, {"access": "", "host": "Array", "name": "indexOf", "url": "Array.html#method_indexOf", "type": "method"}, {"access": "private", "host": "YUI", "name": "_init", "url": "YUI.html#method__init", "type": "method"}, {"access": "", "host": "config", "name": "injected", "url": "config.html#property_injected", "type": "property"}, {"access": "", "host": "Loader", "name": "insert", "url": "Loader.html#method_insert", "type": "method"}, {"access": "", "host": "config", "name": "insertBefore", "url": "config.html#property_insertBefore", "type": "property"}, {"access": "", "host": "Loader", "name": "insertBefore", "url": "Loader.html#property_insertBefore", "type": "property"}, {"access": "", "host": "Loader", "name": "inserted", "url": "Loader.html#property_inserted", "type": "property"}, {"access": "private", "host": "Loader", "name": "_internalCallback", "url": "Loader.html#property__internalCallback", "type": "property"}, {"access": "", "host": "Lang", "name": "isArray", "url": "Lang.html#method_isArray", "type": "method"}, {"access": "", "host": "Lang", "name": "isBoolean", "url": "Lang.html#method_isBoolean", "type": "method"}, {"access": "", "host": "Lang", "name": "isDate", "url": "Lang.html#method_isDate", "type": "method"}, {"access": "", "host": "Lang", "name": "isFunction", "url": "Lang.html#method_isFunction", "type": "method"}, {"access": "", "host": "Lang", "name": "isNull", "url": "Lang.html#method_isNull", "type": "method"}, {"access": "", "host": "Lang", "name": "isNumber", "url": "Lang.html#method_isNumber", "type": "method"}, {"access": "", "host": "Lang", "name": "isObject", "url": "Lang.html#method_isObject", "type": "method"}, {"access": "", "host": "Lang", "name": "isString", "url": "Lang.html#method_isString", "type": "method"}, {"access": "", "host": "Lang", "name": "isUndefined", "url": "Lang.html#method_isUndefined", "type": "method"}, {"access": "", "host": "Lang", "name": "isValue", "url": "Lang.html#method_isValue", "type": "method"}, {"access": "", "host": "config", "name": "jsAttributes", "url": "config.html#property_jsAttributes", "type": "property"}, {"access": "", "host": "Loader", "name": "jsAttributes", "url": "Loader.html#property_jsAttributes", "type": "property"}, {"access": "", "host": "YUI", "name": "key", "url": "YUI.html#event_key", "type": "event"}, {"access": "", "host": "Object", "name": "keys", "url": "Object.html#method_keys", "type": "method"}, {"access": "", "host": "YUI", "name": "later", "url": "YUI.html#method_later", "type": "method"}, {"access": "private", "host": "Get", "name": "_linkNode", "url": "Get.html#method__linkNode", "type": "method"}, {"access": "", "host": "Loader", "name": "loaded", "url": "Loader.html#property_loaded", "type": "property"}, {"access": "", "host": "Loader", "name": "loadNext", "url": "Loader.html#method_loadNext", "type": "method"}, {"access": "", "host": "Loader", "name": "loadOptional", "url": "Loader.html#property_loadOptional", "type": "property"}, {"access": "", "host": "config", "name": "locale", "url": "config.html#property_locale", "type": "property"}, {"access": "", "host": "YUI", "name": "log", "url": "YUI.html#method_log", "type": "method"}, {"access": "", "host": "config", "name": "logExclude", "url": "config.html#property_logExclude", "type": "property"}, {"access": "", "host": "config", "name": "logInclude", "url": "config.html#property_logInclude", "type": "property"}, {"access": "", "host": "YUI", "name": "merge", "url": "YUI.html#method_merge", "type": "method"}, {"access": "", "host": "YUI", "name": "message", "url": "YUI.html#method_message", "type": "method"}, {"access": "", "host": "YUI", "name": "mix", "url": "YUI.html#method_mix", "type": "method"}, {"access": "", "host": "UA", "name": "mobile", "url": "UA.html#property_mobile", "type": "property"}, {"access": "", "host": "Loader", "name": "moduleInfo", "url": "Loader.html#property_moduleInfo", "type": "property"}, {"access": "", "host": "config", "name": "modules", "url": "config.html#property_modules", "type": "property"}, {"access": "", "host": "YUI", "name": "mouseenter", "url": "YUI.html#event_mouseenter", "type": "event"}, {"access": "", "host": "YUI", "name": "mouseleave", "url": "YUI.html#event_mouseleave", "type": "event"}, {"access": "", "host": "YUI", "name": "namespace", "url": "YUI.html#method_namespace", "type": "method"}, {"access": "private", "host": "Get", "name": "_next", "url": "Get.html#method__next", "type": "method"}, {"access": "private", "host": "Get", "name": "_node", "url": "Get.html#method__node", "type": "method"}, {"access": "", "host": "Array", "name": "numericSort", "url": "Array.html#method_numericSort", "type": "method"}, {"access": "", "host": "config", "name": "onCSS", "url": "config.html#property_onCSS", "type": "property"}, {"access": "", "host": "Loader", "name": "onCSS", "url": "Loader.html#method_onCSS", "type": "method"}, {"access": "", "host": "Loader", "name": "onFailure", "url": "Loader.html#method_onFailure", "type": "method"}, {"access": "", "host": "Loader", "name": "onProgress", "url": "Loader.html#method_onProgress", "type": "method"}, {"access": "", "host": "Loader", "name": "onSuccess", "url": "Loader.html#method_onSuccess", "type": "method"}, {"access": "", "host": "Loader", "name": "onTimeout", "url": "Loader.html#method_onTimeout", "type": "method"}, {"access": "", "host": "UA", "name": "opera", "url": "UA.html#property_opera", "type": "property"}, {"access": "", "host": "UA", "name": "os", "url": "UA.html#property_os", "type": "property"}, {"access": "", "host": "Object", "name": "owns", "url": "Object.html#method_owns", "type": "method"}, {"access": "", "host": "config", "name": "pollInterval", "url": "config.html#property_pollInterval", "type": "property"}, {"access": "private", "host": "Get", "name": "_purge", "url": "Get.html#method__purge", "type": "method"}, {"access": "private", "host": "Get", "name": "PURGE_THRESH", "url": "Get.html#property_PURGE_THRESH", "type": "property"}, {"access": "", "host": "config", "name": "purgethreshold", "url": "config.html#property_purgethreshold", "type": "property"}, {"access": "private", "host": "Get", "name": "purging", "url": "Get.html#property_purging", "type": "property"}, {"access": "private", "host": "Get", "name": "qidx", "url": "Get.html#property_qidx", "type": "property"}, {"access": "private", "host": "Get", "name": "queue", "url": "Get.html#method_queue", "type": "method"}, {"access": "private", "host": "Get", "name": "queues", "url": "Get.html#property_queues", "type": "property"}, {"access": "private", "host": "Loader", "name": "_reduce", "url": "Loader.html#method__reduce", "type": "method"}, {"access": "", "host": "Loader", "name": "require", "url": "Loader.html#method_require", "type": "method"}, {"access": "", "host": "Loader", "name": "required", "url": "Loader.html#property_required", "type": "property"}, {"access": "private", "host": "Get", "name": "_returnData", "url": "Get.html#method__returnData", "type": "method"}, {"access": "private", "host": "Loader", "name": "_rollup", "url": "Loader.html#method__rollup", "type": "method"}, {"access": "", "host": "Loader", "name": "rollups", "url": "Loader.html#property_rollups", "type": "property"}, {"access": "", "host": "config", "name": "root", "url": "config.html#property_root", "type": "property"}, {"access": "", "host": "Loader", "name": "root", "url": "Loader.html#property_root", "type": "property"}, {"access": "", "host": "Get", "name": "script", "url": "Get.html#method_script", "type": "method"}, {"access": "private", "host": "Get", "name": "_scriptNode", "url": "Get.html#method__scriptNode", "type": "method"}, {"access": "", "host": "UA", "name": "secure", "url": "UA.html#property_secure", "type": "property"}, {"access": "", "host": "config", "name": "secureBase", "url": "config.html#property_secureBase", "type": "property"}, {"access": "private", "host": "YUI", "name": "_setup", "url": "YUI.html#method__setup", "type": "method"}, {"access": "private", "host": "Loader", "name": "_setup", "url": "Loader.html#method__setup", "type": "method"}, {"access": "", "host": "Object", "name": "setValue", "url": "Object.html#method_setValue", "type": "method"}, {"access": "", "host": "YUI", "name": "simulate", "url": "YUI.html#method_simulate", "type": "method"}, {"access": "", "host": "Object", "name": "size", "url": "Object.html#method_size", "type": "method"}, {"access": "", "host": "Loader", "name": "skin", "url": "Loader.html#property_skin", "type": "property"}, {"access": "", "host": "Loader", "name": "skipped", "url": "Loader.html#property_skipped", "type": "property"}, {"access": "", "host": "Array", "name": "some", "url": "Array.html#method_some", "type": "method"}, {"access": "private", "host": "Loader", "name": "_sort", "url": "Loader.html#method__sort", "type": "method"}, {"access": "", "host": "Loader", "name": "sorted", "url": "Loader.html#property_sorted", "type": "property"}, {"access": "", "host": "YUI", "name": "stamp", "url": "YUI.html#method_stamp", "type": "method"}, {"access": "", "host": "Array", "name": "test", "url": "Array.html#method_test", "type": "method"}, {"access": "", "host": "config", "name": "throwFail", "url": "config.html#property_throwFail", "type": "property"}, {"access": "", "host": "config", "name": "timeout", "url": "config.html#property_timeout", "type": "property"}, {"access": "private", "host": "Get", "name": "_timeout", "url": "Get.html#method__timeout", "type": "method"}, {"access": "", "host": "Loader", "name": "timeout", "url": "Loader.html#property_timeout", "type": "property"}, {"access": "private", "host": "Get", "name": "_track", "url": "Get.html#method__track", "type": "method"}, {"access": "", "host": "Lang", "name": "trim", "url": "Lang.html#method_trim", "type": "method"}, {"access": "", "host": "Lang", "name": "type", "url": "Lang.html#method_type", "type": "method"}, {"access": "private", "host": "Loader", "name": "_url", "url": "Loader.html#method__url", "type": "method"}, {"access": "", "host": "YUI", "name": "use", "url": "YUI.html#method_use", "type": "method"}, {"access": "", "host": "config", "name": "useBrowserConsole", "url": "config.html#property_useBrowserConsole", "type": "property"}, {"access": "private", "host": "Loader", "name": "_useYahooListener", "url": "Loader.html#property__useYahooListener", "type": "property"}, {"access": "", "host": "Object", "name": "values", "url": "Object.html#method_values", "type": "method"}, {"access": "", "host": "UA", "name": "webkit", "url": "UA.html#property_webkit", "type": "property"}, {"access": "", "host": "config", "name": "win", "url": "config.html#property_win", "type": "property"}, {"access": "", "host": "YUI", "name": "windowresize", "url": "YUI.html#event_windowresize", "type": "event"}, {"access": "", "host": "config", "name": "windowResizeDelay", "url": "config.html#property_windowResizeDelay", "type": "property"}];
</script>
</body>
</html>
